Method, System, and Computer Program Product for the Detection of Physical Activity by Changes in Heart Rate, Assessment of Fast Changing Metabolic States, and Applications of Closed and Open Control Loop in Diabetes

ABSTRACT

A method, system, and computer program product related to the detection of physical activity using changes in heart rate. The method, system, and computer program product evaluates short term glucose demand and long term insulin action due to physical activity. The method, system, and computer program product is further related to the improvement of open and closed loop control of diabetes by accounting for the metabolic changes due to physical activity. The method, system, and computer program product is directed to detecting in real time the short and long term effects of physical activity on insulin action via heart rate analysis, and recommending changes in insulin dosing to compensate for the effects of physical activity. With these recommendations, the open and closed loop control of diabetes can be improved and steps can be taken to prevent hypoglycemia that may result from increased insulin sensitivity due to physical activity.

RELATED APPLICATIONS

The present application claims priority from U.S. ProvisionalApplication Ser. No. 60/861,217, filed Nov. 27, 2006, entitled “Method,System, and Computer Program Product for Closed-loop Control in DiabetesDuring Fast Changing Metabolic States Reflected by Changes in HeartRate,” U.S. Provisional Application Ser. No. 60/919,103, filed Mar. 20,2007, entitled “Method, System, and Computer Program Product forClosed-loop Control in Diabetes During Fast Changing Metabolic StatesReflected by Changes in Heart Rate,” and U.S. Provisional ApplicationSer. No. 60/982,251, filed Oct. 24, 2007, entitled “Method, System, andComputer Program Product for Closed-loop Control in Diabetes During FastChanging Metabolic States Reflected by Changes in Heart Rate,” theentire disclosures of which are hereby incorporated by reference hereinin their entirety.

GOVERNMENT SUPPORT

Work described herein was supported by Federal Grant No.RO1 DK 51562,awarded by National Institutes of Health. The United States Governmenthas certain rights in the invention.

FIELD OF INVENTION

The present system relates generally to the art of open and closed loopcontrol systems for the control of diabetes, and more importantly to theassessment of changes in insulin sensitivity.

BACKGROUND OF THE INVENTION

Recent advancements in diabetes technology include two parallel rapidlyevolving areas: insulin delivery devices (subcutaneous or implantedinsulin pumps) and continuous glucose monitors (CGM) recording frequentglucose determinations. So far, these two types of devices have not beenlinked successfully in a closed-loop glucose control system, e.g.artificial pancreas, which has the potential to dramatically improveblood glucose (BG) control, advance the quality of diabetes care, andhelp prevent costly complications of diabetes. Arguably, aminimally-invasive subcutaneous, SC-SC closed loop would have greatestpotential for everyday use. Currently, there are five available SC CGMdevices and several SC insulin pumps. A major challenge to a reliableexternal closed-loop control based on CGM and SC insulin injectionremains the development of optimal control algorithms. A major obstacleto optimal control are two time delays inherent with SC systems: (i) theCGM resides in interstitial fluid and there exists a 5-20 minute timelag due to blood-to-interstitial glucose transport and sensor limits,and (ii) a change in the rate of insulin delivery takes ˜30 minutes toresult in change in insulin action. While these time delays have littleimpact in steady metabolic states (e.g. during sleep), they are criticalduring rapidly changing metabolic demands, such as meals and physicalactivity.

Physical activity is recognized as a major trigger of potentiallydangerous hypoglycemia. While patients may ingest glucose to compensatefor acutely higher demand during exercise, the long-term (several hours)increase in insulin sensitivity attributed to exercise typically remainshidden. In addition, in automated closed loop, both the acute andlong-term effects of physical activity will need to be handled withoutassistance. However, physical activity cannot be reliably detected viaglucose monitoring alone because counterregulatory and other processesdelay the BG fall. As a result, in most instances, a control algorithmrelying on CGM data alone, would fail to reduce the insulin infusion ina timely way and would risk inducing hypoglycemia.

An additional input beyond BG is needed to detect the onset andmagnitude of physical activity. A logical candidate for such a datainput is heart rate (HR). Thus, the technology proposed regardingvarious aspects of the present invention meets an important need andprovides the capability to overcome a major obstacle to closed-loopcontrol—the inability to account for metabolic changes due to physicalactivity—by providing an additional information source through HRanalysis.

During the past 10 years we have developed an array of mathematicalmethods describing the pathophysiology of Type 1 and Type 2 diabetes(T1DM, T2DM) at several system levels, from glucose-insulin controlnetwork to self-treatment behavior. Recently we have establishedcollaboration with Prof. Claudio Cobelli, University of Padova, Italy,who has long-standing high visibility in the field of modeling glucosedynamics and is one of the authors of the now classic Glucose MinimalModel of Glucose Kinetics (MMGK).

Aspects associated with various embodiments of the present inventionachieves, but not limited thereto, the following method, system andcomputer program product having the following objective: quantitativelydescribe the effects of physical activity on glucose-insulin dynamics inT1DM and develop an algorithm detecting via heart rate analysis theshort-term and long-term changes in insulin sensitivity resulting fromexercise. The method, system and computer program product may utilizethe proposed algorithm that would have applications in both open-loopcontrol systems providing feedback about metabolic state to the patient,and in fully automated closed-loop artificial pancreas.

Insulin Sensitivity:

The dynamics of interstitial concentrations of insulin and glucose hasbeen mathematically characterized by Bergman and Cobelli's now classicMMGK [2],[3], and in a number of subsequent studies [4]-[10]. As aresult, excellent methods exist for quantitative assessment of insulinsensitivity in a laboratory [4] and in an outpatient setting from oralglucose tolerance test (OGTT) [7]. The MMGK allows estimation of insulinsensitivity (SI) and insulin action (X) from intravenous tests (FIG. 1).Dr. Cobelli's group has been at the forefront of these investigations,with more than 200 publications addressing various aspects ofglucose-insulin dynamics in health and disease, including estimates ofpostprandial glucose dynamics [13]-[17]. Usually the model isnumerically identified by nonlinear least squares or maximum likelihoodmethods, however more sophisticated approaches in healthy and T2DMsubjects have been used as well [19],[20]. The potential for adding aglucose tracer allowing the segregation of insulin action on peripheryvs. the liver, has been investigated as well [20].

The MMGK is designed to mimic physiology via two ordinary differentialequations: one governing the dynamics of glucose (considered to be aunique compartment G), another governing the dynamics of remote insulinaction (compartment X). In these equations (presented below) S_(G)represents the balance between liver production/clearance and insulinindependent utilization, linearized around a basal glucose value G_(b);X represents the insulin dependent glucose clearance; and Ra(t) theexternal input of glucose (meal or IV injection). The insulin dependentclearance is also a linear simplification around the basal insulin levelI_(b), and insulin sensitivity is defined as gain of the secondequation:

$S_{I} = {\frac{p_{3}}{p_{2}}.}$

$\begin{matrix}\{ \begin{matrix}{\overset{.}{G} = {{- {S_{G}( {G - G_{b}} )}} - {X \cdot G} + \frac{{Ra}(t)}{V}}} \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}}\end{matrix}  & {{Eq}.\mspace{14mu} 1.1}\end{matrix}$

Effect of exercise on glucose homeostasis: Optimal meal managementrequires the injection, in a timely fashion, of enough insulin to returnto target blood glucose value within minimum time, avoidinghypoglycemia. The challenge with physical activity is different in thatwe are not reacting to a system perturbation (such as glucose enteringthe blood via the GI track) but to transient changes in the parametersof glucose/insulin dynamics, which lead to increased effectiveness ofinsulin [21], and potentially to hypoglycemia. These changes are wellknown, though not always precisely quantified, and revolve mostly aroundchanges in glucose transport through the cell membrane and vascularchanges (FIG. 2). Exercise has been shown to augment the availability ofthe glucose transporter GLUT-4, both by translocation to the cellmembrane [22]-[24] and increased transcription in muscle cells[25],[26]. These changes have been shown to be associated with anincrease in insulin sensitivity and insulin independent glucose uptake[21],[24],[27],[28]. The pathways of exercise-induced translocation andaugmented transcription are not entirely elucidated yet; but musclefibers contractions have been proven to be at the source of thesechanges [28]. Though abundantly studied, the effects of exercise onglucose/insulin dynamics have been primarily approached in medical andbiological terms. Concepts such as glucose transporter translocation,insulin sensitivity increase, or changes in transcription oftransporters have been shown but never with a quantitative approach inmind. It is not to say that models have not been used to study thesephenomena—there are numerous examples in the literature of studies usingdifferent versions of the MMGK to compare the glucose dynamics pre andpost exercise [21],[27],[29]-[33]. However, real-time detection of theshort- and long-term effects of physical activity on insulin sensitivityhas not been accomplished.

Heart rate is a natural marker of physical activity due to itsavailability in the field and strong link with exercise duration andintensity [37]. Other metrics could be better suited to measure exerciseintensity (e.g. V_(O2max) and lactate threshold) and are tightly relatedto qualitative change in exercise physiology [38], but they aredifficult to measure in field conditions. Considering the strong linearrelationship displayed between maximum heart rate and V_(O2max) [39],the proposed invention uses the difference between HR and a basalmeasure (minimum HR at rest) as a marker of exercise.

SUMMARY OF THE INVENTION

Closed loop systems have been proven difficult to apply in clinicaldiabetes management, for both technical and physiological reasons. Theautomatic injection of insulin in patients with Type 1 diabetes (T1DM),a timely and adapted response to changing blood glucose levels, isnaturally impaired by erroneous, or delayed, blood glucose reading, andtechnological delays in exogenous insulin action. For these reasons,simple model-independent control algorithms, such as PID controllers,have insofar failed to provide reliable, safe, automatic control ofT1DM. Though more promising and more complex, model-predictive control(MPC) algorithms are still in development phase and are unable to tacklemajor daily life challenges, such as meals and physical activity. One ofthe reasons these algorithms (both PID and MPC) fail to provide a robustclosed loop system is the inconsistent nature of the physiologicalreaction to insulin. This reaction is quantified by the well known indexInsulin Sensitivity (SI), derived from the Bergman-Cobelli minimal modelof glucose kinetics. The problem is that the SI changes rapidly with anysystem disturbance and many such changes are hard to detect via glucosemonitoring alone. Certain changes in glucose utilization and insulinaction due to meals are well modeled; the circadian rhythm of the SI isunderstood as well. However, the effect of physical activity, and moreimportantly its quantifying, is largely unknown. An aspect of variousembodiments of the present invention method, system and computer programproduct to be included in open- and closed-loop systems may comprise,but not limited thereto, the following:

-   -   The addition of heart rate (HR) monitoring;    -   * The detection of physical activity, its duration and        intensity, through HR and glucose changes;    -   The modeling of changes in glucose uptake due to physical        activity, in potentially two phases:        -   A short-term phase corresponding to increased glucose            utilization during physical activity and shortly (1-2 hours)            after;        -   A long-term phase (hours-to-days) corresponding to changes            in insulin sensitivity and glucose replenishment triggered            by prolonged intense physical activity;    -   The computing of recommended changes in insulin dose        compensating for the effects of physical activity on insulin        sensitivity.

In summary, an aspect of various embodiments of the present inventionmethod, system and computer program product may focus on, but notlimited thereto, the changes in glucose/insulin dynamics in T1DM duringand after exercise and their quantification via mathematical modeling.Once identified and quantified these dynamics can be used to adaptinsulin delivery to announced, or detected via heart rate, amount ofexercise and therefore avoid under and overestimation of insulin needs.Such an optimal treatment would minimize the frequency of hypo- andhyperglycemic episodes frequently following over or under compensationfor exercise, would be applicable to open-loop control treatmentstrategies (e.g. adaptive basal insulin and bolus patterns), and wouldbe particularly critical in any closed-loop application relying onautomated insulin delivery.

An aspect of an embodiment of the present invention provides a method(and related system and computer program product) for detecting physicalactivity and its effects on metabolic demand. The method (and relatedsystem and computer program product) may further comprise: detectingonset of the physical activity using changes in heart rate data. Themethod may further comprise acquiring heart rate data. Further, thedetection of physical activity may comprise: transforming the heart ratedata; computing an index to detect physical activity based on results ofthe transformation; and detecting physical activity using the index andthe heart rate data.

An aspect of an embodiment of the present invention provides a method(and related system and computer program product) for detecting physicalactivity and its effects on metabolic demand. The method (and relatedsystem and computer program product) may further comprise: evaluatingeffects of physical activity on glucose demand. The method may furthercomprise: acquiring glucose data and heart rate data. Further, thedetection of physical activity may comprise: transforming the heart ratedata; computing an index to detect physical activity based on results ofthe transformation; and detecting physical activity using the index andthe heart rate data.

An aspect of an embodiment of the present invention provides a method(and related system and computer program product) for detecting physicalactivity and its effects on metabolic demand. The method (and relatedsystem and computer program product) may further comprise: evaluatingchanges in insulin sensitivity and glucose demand due to the physicalactivity; and indicating recommendations of insulin dosing. The methodmay further comprise: acquiring glucose data, insulin delivery data andheart rate data. Further, the detection of physical activity maycomprise: transforming the heart rate data; computing an index to detectphysical activity based on results of the transformation; and detectingphysical activity using the index and the heart rate data.

A method, system, and computer program product related to the detectionof physical activity using changes in heart rate. The method, system,and computer program product evaluates short term glucose demand andlong term insulin action due to physical activity. The method, system,and computer program product is further related to the improvement ofopen and closed loop control of diabetes by accounting for the metabolicchanges due to physical activity. The method, system, and computerprogram product is directed to detecting in real time the short and longterm effects of physical activity on insulin action via heart rateanalysis, and recommending changes in insulin dosing to compensate forthe effects of physical activity. With these recommendations, the openand closed loop control of diabetes can be improved and steps can betaken to prevent hypoglycemia that may result from increased insulinsensitivity due to physical activity.

These and other objects, along with advantages and features of theinvention disclosed herein, will be made more apparent from thedescription, drawings and claims that follow.

BRIEF SUMMARY OF THE DRAWINGS

The accompanying drawings, which are incorporated into and form a partof the instant specification, illustrate several aspects and embodimentsof the present invention and, together with the description herein, andserve to explain the principles of the invention. The drawings areprovided only for the purpose of illustrating select embodiments of theinvention and are not to be construed as limiting the invention.

FIG. 1 provides a graphical representation of the Minimal Model ofGlucose Kinetics.

FIG. 2 provides a graphical representation of the effect of exercise ontransmembrane glucose transport.

FIG. 3 provides a graphical representation of the Exercise Minimal Modelof Glucose Kinetics (EMMGK).

FIG. 4 provides a graphical representation of the model of insulinkinetics.

FIG. 5 provides a graphical representation of the validation of spectralindex detection of exercise.

FIGS. 6(A)-(C) provide a graphical representation of the case study ofchanges in glucose usage due to exercise. Case study: day1 of subject121, referring to FIG. 6(A): glucose measure (as illustrated by redcross-marks “+” having a line there through it), injection (asillustrated in blue cross-marks “+”) and modeling (blue curve); FIG.6(B): insulin injection (blue, as identified as “insulin pump” in thegraph), concentration (green as identified as “free insulin” in thegraph) and action (black as identified as “remote insulin action” in thegraph); FIG. 6(C): transient (blue as identified as “glucose pump” inthe graph) and long term (red as identified as “Si” in the graph)changes in glucose usage.

FIG. 7 provides a graphical representation of the average increase ininsulin action due to exercise, illustrated by the shaded arearepresenting the average difference between the theoretical (MMGK) andempirical insulin action.

FIG. 8 provides a comparison of the classic MMGK and the newExercise-specific model, illustrating the superiority of the EMMGKaccording to the Akaike information criterion. The MMGK is graphicallyillustrated with the bar graphs having lighter shading and the EMMGK isgraphically illustrated with the bar graphs having darker shading

FIG. 9 provides a graphical representation of sharp increase in glucoseconsumption and change in insulin secretion due to exercise. Measuredsamples are represented by blue as illustrated by cross marks “+” andsmoothed curved are in red as illustrated by solid lines.

FIG. 10 provides a block diagrammatic representation of one of theembodiments of the invention.

FIG. 11 provides a functional block diagram (an exemplary andnon-limiting example) for a computer system for implementation ofembodiments of the present invention.

FIG. 12 provides a simplified flowchart of an aspect of an exemplaryembodiment of the present invention method, system and computer programproduct for detecting physical activity, its duration and intensitythrough HR.

FIG. 13 provides a simplified flowchart of an aspect of an exemplaryembodiment of the present invention method, system and computer programproduct for quantifying short-term and/or long-term changes in insulinsensitivity due to physical activity.

FIG. 14 provides a simplified flowchart of an aspect of an exemplaryembodiment of the present invention method, system and computer programproduct for computing recommended changes in insulin dose to compensatefor the effects of physical activity on insulin sensitivity

DETAILED DESCRIPTION OF THE INVENTION

An aspect of various embodiments of the present invention method, systemand computer program product comprises, but not limited thereto, thequantitative estimation of short-term and long-term changes inindividual insulin sensitivity (SI) from heart rate. The computation ofthese changes may rely on the mathematical algorithm described below,which is derived from the classic MMGK. As shown in the literature, theparameters of the minimal model (S_(I) but also S_(G) ) cansignificantly change during and after physical activity [21],[34]. Thesechanges are consequence from vascular and metabolic adaptations toincreased energy utilization and storage described above, rendering theminimal model impossible to use during exercise without a precisedescription of the amplitude and dynamics of these changes. Moreover,without announcement, the timing of exercise is not known, makingdifficult any real-time exercise detection.

The Exercise Minimal Model of Glucose Kinetics (EMMGK):

In a previous publication [36] we have shown that changes inglucose/insulin dynamics due to mild to moderate exercise can bedescribed in two phases: a transient change in insulin independentglucose clearance and a longer term change in insulin sensitivity,confirming and expanding the work of Derouich et al. [34] with clinicaldata. The EMMGK is a model based on these studies but with no changes inmodel parameters. Instead we minimally augment the state of the system,using HR as a driving function. This results in the augmentation of MMGK(See FIG. 1) with two additional compartments Y and Z presented in FIG.3.

The equations governing these compartments are:

$\begin{matrix}\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z} + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}}  & {{Eq}.\mspace{14mu} 1.2}\end{matrix}$

In the first equation glucose clearance is augmented during exercise viaboth the insulin independent (by αY) and insulin dependent terms (byβZ). Y is computed as ΔHR smoothed and delayed via a first order linearordinary differential equation (ODE). Thus, Y represents the transientshort-term increase in glucose uptake due to exercise. Z is controlledvia a non linear ODE driven by f(Y). The function f(Y) is constructed sothat it is negligible until Y reaches a certain fraction of the basalHR, corresponding to onset of exercise; f(Y) reaches 1 rapidlythereafter (speed is dependent on a and n) and drives Z upward. Afterexercise f(Y) resumes a negligible value, allowing Z to slowly driftback via quasi exponential decay driven by τ. Thus, Z represents thelong-term change in insulin sensitivity due to exercise. It should beappreciated that alternative solutions of the aforementioned equationmay be implemented to achieve the objective of the present invention.

Short Term Equation

The equation below corresponds to short term changes in glucose demandand short term changes in glucose demand and insulin action:

$\begin{matrix}\{ \begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3)\end{matrix}  & {{Eq}.\mspace{14mu} 1.3}\end{matrix}$

where G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity, β representsthe short term metabolic demand to heart rate ratio, HR represents heartrate, HR_(b) represents basal heart rate, p₁ represents the balancebetween liver production/demand and insulin independent glucose demand,τ_(HR) represents the lag between onset of physical activity and changesin metabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, and p₃ represents the intensity of insulinaction. It should be appreciated that alternative solutions of theaforementioned equation may be implemented to achieve the objective ofthe present invention.

Long Term Equation

The equation below corresponds to long term changes in glucose demandand long term changes in glucose demand and insulin action:

$\begin{matrix}\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}}  & {{Eq}.\mspace{14mu} 1.4}\end{matrix}$

where G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity, β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, αrepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.

Identifying the EMMGK:

The described model is highly subject-specific: S_(I) but also S_(G) orp₂ can have up to 10-fold difference between people; thereforeidentifying the model parameters for a particular person critical iscritical for its algorithmic application. To estimate the modelparameters we first assume that blood glucose, blood insulin, and heartrate are available. In this case, we fix τ, τ_(EX), α, and n to reflectpublished results (e.g. significant S_(I) augmentation for up to 20hours after exercise). Then, by recursively differentiating the model wecan demonstrate that, if plasma glucose, insulin, and HR are measured,all non fixed parameters are theoretically identifiable.

Insulin Kinetics

In practice, insulin concentration is difficult to measure and isimpossible to measure under field conditions. Thus, we derive insulinconcentration from the only available source of insulin data in T1DM—therate of insulin infusion from the insulin pump. This extrapolationrequires knowledge of the kinetics of insulin transport fromsubcutaneous delivery (insulin pump) to blood. Insulin kinetics can bemodeled via the 2-compartment model in FIG. 4. This model was firstpresented by Dalla Man [45] in T2DM and health and further refined inT1DM.

The model equations are:

$\begin{matrix}\{ {{\begin{matrix}{{\overset{.}{I}}_{P} = {{m_{1}I_{L}} - {( {m_{2} + m_{4}} )I_{P}} + {k_{1}I_{{SC}_{1}}} + {k_{2}I_{{SC}_{2}}}}} \\{{\overset{.}{I}}_{L} = {{m_{2}I_{P}} - {( {m_{1} + m_{3}} )I_{L}}}} \\{{\overset{.}{I}}_{{SC}_{1}} = {{{- ( {k_{1} + k_{d}} )}I_{{SC}_{1}}} + {J(t)}}} \\{{\overset{.}{I}}_{{SC}_{2}} = {{{- k_{2}}I_{{SC}_{2}}} + {k_{1}I_{{SC}_{1}}}}}\end{matrix}{I_{P}(0)}} = {{I_{Pb}{I_{L}(0)}} = {{I_{Lb}{I(t)}} = {{{{I_{P}(t)}/V_{i}}{I_{{SC}_{1}}(0)}} = {{{J_{b}/k_{1}} + {k_{d}{I_{{SC}_{2}}(0)}}} = {k_{1}{{I_{{SC}_{1}}(0)}/k_{2}}}}}}}}  & {{Eq}.\mspace{14mu} 2}\end{matrix}$

I_(p) denotes the insulin mass in plasma, I_(L) the insulin mass in theLiver, and I denote the concentration of plasma insulin, therefore Vi isthe diffusion volume of the plasma compartment. Suffix b denotes basalstate, J subcutaneous insulin injection (pmol/kg/min), m₁, m₂, m₄(min-1) rate parameters. Degradation, D, occurs both in the liver and inthe periphery. Peripheral degradation has been assumed linear (m₄). Itshould be appreciated that alternative solutions of the aforementionedequation may be implemented to achieve the objective of the presentinvention.

Modification of Insulin Regimen Using the EMMGK.

Assuming that we have an optimal insulin injection schedule J(t), whichcan be a closed loop control, an open loop control, or any insulinmanagement plan that includes a continuous injection component. Usingthe EMMGK we can derive an optimal adaptation to exercise of thisinjection schedule as follow:

Since

$\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z} + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}$

and considering we can only act on insulin, id est the value of X. Wecan compute the value of X that would ensure no visible effect ofexercise:

$\begin{matrix}(a) & {\overset{\sim}{X} = \frac{X}{1 + {\alpha \; Z} + {\beta \; Y}}}\end{matrix}$

defining

${S_{I} = \frac{p_{2}}{p_{3}}},$

and CL to be the insulin clearance, we have

$\begin{matrix}(b) & {X_{\infty} = {S_{I}\frac{J_{\infty} - J_{b}}{CL}}}\end{matrix}$

where J_(b) is the injection needed to obtain the plasma insulinconcentration I_(b) therefore, we obtain a new injection scheduledderive from equation (a) and (b)

$\begin{matrix}{{S_{I}\frac{\overset{\sim}{J} - J_{b}}{CL}} = { {S_{I}\frac{J - J_{b}}{{CL}( {1 + {\alpha \; Z} + {\beta \; Y}} )}}\Rightarrow{\overset{\sim}{J}(t)}  = {\frac{J(t)}{1 + {\alpha \; {Z(t)}} + {\beta \; {Y(t)}}} + {\frac{{\alpha \; {Z(t)}} + {\beta \; {Y(t)}}}{1 + {\alpha \; {Z(t)}} + {\beta \; {Y(t)}}}J_{b}}}}} & {{Eq}.\mspace{14mu} 3.1}\end{matrix}$

For short term insulin dosing, the following equation represents theinjection schedule:

$\begin{matrix}{{\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\beta \; {Y(t)}}} + {\frac{\beta \; {Y(t)}}{1 + {\beta \; {Y(t)}}}J_{b}}}} & {{Eq}.\mspace{14mu} 3.2}\end{matrix}$

where {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Y(t) represents the transient variation in metabolic activity,J_(b) is injection needed to obtain the plasma concentration I_(b), βrepresents the short term metabolic demand to heart rate ratio.For long term insulin dosing, the following equation represents theinjection schedule:

$\begin{matrix}{{\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\alpha \; {Z(t)}}} + {\frac{\alpha \; {Z(t)}}{1 + {\alpha \; {Z(t)}}}J_{b}}}} & {{Eq}.\mspace{14mu} 3.3}\end{matrix}$

where {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Z(t) is the long-term change in insulin sensitivity due tophysical activity at time t, J_(b) is injection needed to obtain theplasma concentration I_(b), and α is the long term change in amplitude.

Using Spectral Analysis of the First Order Difference R-R Intervals toDetect Exercise.

While spectral analysis of the RR-interval is a commonly accepted toolto characterize changes in cardiac activity during exercise [46],[47],its use as a real-time detector of physical activity has not yet beenpresented as part of an insulin management system. This could be in partdue to the difficulty of extracting meaningful spectral information fromthe heart rate signal, as well as to confounding effects such asautonomic neuropathy in diabetes. While an embodiment of the presentinvention uses the changes in heart rate spectral characteristics, thepresent invention provides a novel index to detect exercise, as part ofan insulin management system.

The proposed index is as follow:

$\begin{matrix}{I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}} & {{Eq}.\mspace{14mu} 4}\end{matrix}$

Where P_(t)(Υ) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency Υ. Thesignal is re-sampled at equal intervals (2 Hz) for proper use of Fouriertechniques, and the estimate is obtained by computing the time frequencyrepresentation of the signal on the first order difference of the RRsignal, using wavelet de-noising of the TF representation, and movingaverage smoothing (both in time and frequency domain of width 5). Itshould be appreciated that alternative solutions of the aforementionedequations may be implemented to achieve the objective of the presentinvention.

Algorithmic Implementation of the EMMGK:

An embodiment of the method may have three principal components. Herethese components are presented sequentially, however, each of them canbe used separately in an implementation independent from the others:

-   Component 1: Exercise detector;-   Component 2: Estimator of increase in metabolic demand due to    physical activity;-   Component 3: Recommendation of insulin dosing change to compensate    for exercise.

Data and Data Pre-Processing:

The real-time detection of the changes in insulin sensitivity due tophysical activity relies on the acquisition of a data stream that isavailable from continuous monitoring, HR monitoring, and reporting ofinsulin pump infusion rate. Thus:

Step 1 [components 1, 2, and 3] of the algorithm is to acquire real-timedata from the following sources:

-   -   1. CGM data, typically a time series of frequent BG        determinations generated at a rate of one data point every 1 to        10 minutes;    -   2. Insulin delivery data from insulin pump, including basal rate        and boluses;    -   3. Heart rate data from HR monitor acquired in short time        intervals, e.g. 5 sec.        These three data sources are synchronized to produce a        time-stamped three-dimensional time series of vectors (BG(t),        I(t), HR(t)), which is submitted to the model identification        procedure.        Step 2 [components 1, and 2] includes identifying of basal heart        rate parameters for each individual during rest (e.g.        overnight). This is the “training phase” of the method, which        allows the EMMGK to be tailored to the specifics of the        metabolic system of each person;    -   1. HR_(b) is defined as the overnight average heart rate.    -   2. basal I_(EX) (I_(EXb)) is defined as the average I_(EX)        overnigtht.        Step 3 [component 1] detection of exercise.    -   1. resample last 10 minutes HR signal at 1 Hz using cubic spline    -   2. compute Fast Fourier Transform (FFT) of resampled HR signal        with bandwith smoothing ω=0.05 Hz    -   3. compute I_(EX) based on FFT results.    -   4. If I_(EX)>2*I_(EXb) AND HR>1.3*HR_(b), exercise is detected.        Step 4 [components 2, and 3] includes detection of deviations        from basal state using HR and BG information. These deviations        are quantified using the EMMGK as follows:    -   1. the heart rate signal is smoothed using a Moving Average        algorithm    -   2. the resulting signal is used as an input in equation 3 and 4        of the EMMGK (Z and Y are initialized at 0 ). The differential        equations are solved up to actual time.    -   3. current values of Y and Z are reported.        Step 5 [component 2] includes computation of the change in        metabolic demand.    -   1. get actual Y and Z values    -   2. insulin dependent glucose utilization is increased by αZ+βY        percents        Step 6 [component 3] includes recommendation of changes in        insulin delivery to account for metabolic changes in step 5.        These changes are quantified as follows:    -   1. For open-loop implementation:        -   a. Get actual Z value        -   b. Divide insulin regimen by (1+αZ)    -   2. For closed-loop implementation: Defining the actuation period        (time between 2 consecutive update of the insulin injection) as        τ,        -   a. Get actual Y and Z values        -   b. Adapt closed loop insulin prescription as per equation            1.4; if J_(b) is not available, fix I_(b) to 0, i.e.            J_(b)=0, and divide suggested injection by (1+αZ+βY)            Step 7 [component 3] is the presentation of output from the            procedure described in Steps 1-to-6. The format of the            output depends on the mode of application of the method as            follows:    -   1 For open-loop control applications, a reduction in the basal        pump rate and/or reduction in the subsequent insulin bolus will        be recommended to the patient in units of insulin upon detection        of exercise;    -   2. For automated closed-loop control application, reduced pump        rate and reduced bolus amounts will be directly transmitted to        the insulin pump, using online HR monitoring.

Validation of I_(EX)

This index was computed before, during, and after a low intensity ( 50%V_(O2max)-lactate threshold) exercise bout in 35 T1DM patients, during 2inpatient days at the General Clinical Research Center at the Universityof Virginia (70 traces total). While only some patients presented theexpected (from literature) drop in beat to beat interval variability,see FIG. 5 top panel, almost all (79%) presented a very clear peak inthe I_(EX) index during physical activity. A representative trace ispresented in FIG. 5, lower panel.

Validation of the EMMGK:

We have run two GCRC protocols pertaining to the effect of exercise inhealth and in T1DM:

Protocol #1 (GCRC code WLC015):

-   Subjects: Thirty-nine subjects with TIDM were recruited through    regional advertisement. Exclusion criteria were age>65 years, mental    retardation, psychological diagnoses or active substance abuse. The    average age of the participants was 42.5 years±12, the average    duration of T1DM was 21.6+9.4 years, the average HbAlc was 7.4+0.8%;    there were 16 males.-   Procedure: Subjects were admitted to the University of Virginia GCRC    in the evening prior to the study and their BG levels were    controlled overnight within the target range of 100-150 mg/dl,    preventing hypoglycemia (BG<70mg/dl). Two hyperinsulinemic clamps    were performed on two consecutive days: Each clamp used constant    insulin infusion rate=1 mU/kg/min and variable glucose infusion rate    to achieve and maintain BG levels at approximately 110 mg/dl.    Subsequently, the glucose infusion rate was reduced to permit a    controlled decline in BG of approximately 1 mg/dl/min until BG    reached ˜50 mg/dl. Glucose infusion was then resumed to allow a    recovery to normal glucose levels. The euglycemic portion of the    clamp study varied in length from 70 to 210 minutes, and included 15    minutes of exercise at 50% V_(O2max)-lactate and a 20 minutes    recovery period. The duration of the BG reduction procedure ranged    from 30 to 60 minutes, the recovery ranged from 30 to 60 minutes.    Because insulin was not measured during the protocol, the plasma    concentration was estimated using population parameters for volume    of insulin dispersion and half life of insulin in plasma. Therefore,    insulin concentration is derived from injected insulin, I_(b)    “measured” as the steady state of the basal injection before the    beginning of the clamp, a technique similar to the insulin kinetics    model presented in the precious section.-   Results: As an example we present the curve of day 1 of subject 121    (FIG. 6). While the MMGK (which has fixed insulin sensitivity and    glucose usage) failed to properly follow the measured glucose trace,    small changes (FIG. 6, panel C) in glucose usage and insulin    sensitivity during and after exercise were sufficient to explain the    discrepancy (FIG. 6, panel A). We also observed that a change in    glucose usage during exercise and recovery is not enough to explain    the increase in dextrose infusion.    Using minimal model analysis tools, we assessed:    -   1. Metabolic demand computed from glucose infusion rate        increased by 50% within few minutes of initiation of exercise,        from 4.58 to 6.62 mg/kg/min.    -   2. During exercise insulin action X increased, beginning        approximately 5 minutes after initiation; p₂ increased from        pre-exercise value of 0.009 to 0.34 min⁻¹. The increase in S_(I)        was not significant (8.69 vs 8.86 min⁻¹ per μU/ml) but S_(I)        ^(D) increased from 2.03 10⁻⁴ to 8.43 10⁻⁴ min⁻¹ per μU/ml.    -   3. After exercise insulin action decayed with a slower than        onset rate constant p₂ 0.19 min⁻¹. S_(I) during recovery was        7.21 min⁻¹ per μU/ml and S_(I) ^(D) 6.59 10⁻⁴ min⁻¹ per μU/ml.

The observed increase in insulin action is depicted in FIG. 7. Theprotocol did not include an observation period long enough to captureexactly the timing of recovery and the return of glucose usage to basalvalues. Values in the literature for such a return range between 20 and24 hours.

The EMMGK was able to follow glucose dynamics during and after exerciseand, most importantly, to follow the descent into hypoglycemia, whileavoiding unrealistic parameter values. The weighted sum of squarederrors (WSSE) was significantly lower for EMMGK than for the standardMMGK (7.77 vs 18.6 p<0.01). However, comparing error of fit andparameter values is not sufficient to judge the superiority of a model,because EMMGK demands the estimation of 2 additional parameters.Therefore to fully compare EMMGK and MMGK we computed a modified Akaikeinformation criterion (AIC) for each model and each subject. Thiscriterion accounts for the number of parameters. The EMMGK showedsignificantly lower AIC values than the MMGK: −0.85 vs −0.25, p<0.05;therefore showing a significant advantage in using the EMMGK over theclassic MMGK during and after exercise, as shown in FIG. 8:

Protocol #2 (GCRC code MDB001):

-   Subjects: The MDB001 protocol was conducted in November-December    2006 at the UVa GCRC and enrolled 10 healthy volunteers ages 18    to 35. The protocol was designed to investigate the glucose/insulin    equilibrium and dynamics in health during highly unstable    physiological states, namely: (i) physical activity—both low and    high intensity; (ii) nutrient ingestion. Both situations are common    in daily life and have been identified as major obstacles to closed    loop glucose control. The research plan of MDB001 included a    GCRC-based investigation of the glucose/insulin dynamics during    ingested and injected glucose as well as during physical activity    periods.-   Procedure: To this effect the protocol included an oral glucose    tolerance test (OGTT), an intravenous glucose tolerance test (IVGTT,    considered a gold standard for assessment of glucose kinetics) and a    45-minute exercise period, divided into low- and high-intensity    phases.-   Results: Glucose traces (FIG. 9) show a very sharp decrease in    glucose concentration and insulin concentration at onset of moderate    exercise (minute 220), followed by counterregulation (verified by    epinephrine measurement) which brings glucose back up during the    intense exercise period, and a small decrease in insulin    concentration (minute 250). The results confirm the dynamics of    short-term glucose increase attributed to the onset of exercise. No    long-term effect of exercise on insulin sensitivity could be    directly observed due to the counterregulatory response effect on    S_(I) (transient increase).

In summary, increasing scientific and industrial effort is focused onthe development of closed-loop systems (artificial pancreas) to controlglucose metabolism of people with diabetes, particularly T1DM.Experiments are being conducted with continuous glucose monitors (CGM)coupled with insulin pumps and a control algorithm. While such systemshave proven feasible in steady metabolic states, they fail duringchanging metabolic demands, such as meals and physical activity. Becausephysical activity is a major trigger of acute hypoglycemia in diabetes,the timely detection of metabolic changes is critical for the success ofclosed-loop control. However, increased metabolic demand due to physicalactivity cannot be reliably detected via glucose monitoring alone.

An aspect of various embodiments of the present invention comprises, butnot limited thereto, a method, system, computer program product, deviceand apparatus using changes in heart rate (HR) as a correlate toincreased metabolic demand. Specifically, the invention consists ofthree algorithms: (i) detecting physical activity, its duration andintensity through HR; (ii) quantifying short-term and long-term changesin insulin sensitivity due to physical activity, and (iii) computingrecommended changes in insulin dose to compensate for the effects ofphysical activity on insulin sensitivity.

An aspect of the present invention technology and related methodprovides the capability to overcome one of the major limitations ofopen-loop and closed-loop control of diabetes—the inability to accountfor metabolic changes due to physical activity—by providing anadditional information source through heart rate monitoring.

Continuous monitoring devices are rapidly developing and it is expectedthat they will become soon essential part of the mainstream treatment ofdiabetes. Insulin infusion pumps are on the market, and the firstsystems providing open-loop control have been approved by the FDA (TheParadigm system by Medtronic Minimed, Nortridge, Calif.). Because themetabolic changes due to physical activity are a major obstacle tooptimal open-loop or closed-loop glucose control, this invention willprovide numerous advantages. An aspect of various embodiments of thepresent invention may provide a number of advantages, such as but notlimited thereto, the following: automated detection of the onset ofphysical activity using changes in heart rate; quantitative evaluationof short-term changes in insulin sensitivity during and shortly afterphysical activity; quantitative evaluation of long-term changes ininsulin sensitivity following exercise; recommendations for changes ininsulin dose corresponding to the changes in insulin sensitivity inopen-loop control systems and patient advisory systems; and automatedreal-time suggestion of changes in insulin basal rate and boluses inclosed-loop control systems.

Standard clinical practice includes recommendation for lowering insulindose in T1DM prior to or during exercise. However, none of theserecommendations based on direct evaluation of changes in insulinsensitivity. There is no field-based assessment of these changes; and ingeneral there are no treatment recommendations using heart ratemonitoring for any aspect of the treatment of diabetes.

An aspect of various embodiments of the presentation invention mayprovide a number of advantages, such as but not limited thereto, thefollowing: (i) tracking of changes in insulin sensitivity from easilyobtainable hear rate data; (ii) individualized assessment of the effectsof physical activity; (iii) individualized recommendations for changesin insulin dosing to compensate for the effects of physical activity.

Exemplary Systems:

FIG. 10 shows a block diagrammatic representation of one of theembodiments of the invention. Referring to FIG. 10, there is shown ablock diagrammatic representation of the system 1010 comprising a bloodglucose sensor system 1030, heart rate monitor 1040, controller 1050,and insulin delivery system 1060. The glucose meter system 1030 is usedfor reading, inter alia, insulin dosage and blood glucose level 1031 inthe body 1070. The glucose sensor system 1030 generates a sensor signal1032 representative of the blood glucose levels in the body and providesthe sensor signal 1032 to the controller 1050. The heart rate monitorsystem generates a sensor signal 1042 representative of the heart rateof the body 1070 and provides the sensor signal 1042 to the controller1050. The controller receives the sensor signal 1032 from the glucosesensor system 1030 and sensor signal 1042 from the heart rate monitorsystem 1040 and generates control signals 1051 that are communicated tothe insulin delivery system 1060. The insulin delivery system 1060receives the control signals 1051 and infuses insulin 1061 into the body1070 in response to the control signals 1060. The controls signal and/orsensor signals, or any desirable or required signals, may becommunicated among or between any of the modules. It should beappreciated that the system 1010 (and the related method and computerproduct) as shown may include all of the modules as illustrated or anycombination of a partial selection of the modules.

The glucose sensor system 1030 may include a glucose sensor, sensorelectrical components to provide power to the sensor and generate sensorsignal, and a sensor communication system to carry the signal to thecontroller 1050. The sensor system may be enclosed in a housing separatefrom the other modules of the system 1010 or may be enclosed in a singlehousing with the other modules of the system 1010.

The heart rate monitor system 1040 may include a heart rate monitor,monitor electrical components to provide power to the sensor andgenerate signal 1042, and a communication system to carry the signal1042 to the controller 1050. The heart rate monitor system 1040 may beenclosed a housing separate from the other modules of the system 1010 ormay be enclosed in a single housing with the other modules of the system1010.

The controller 1050 includes controller electrical components andsoftware to generate control signals for the insulin delivery system1060. The signals may be sent via wireless or wire means or anycombinations thereof. In a particular embodiment, the controller 1050,insulin delivery system 1060, glucose sensor system 1030, and heart ratemonitor system 1040 may communicate between or among one another viawire. In further alternative embodiments, the controller 1050, insulindelivery system 1060, glucose sensor system 1030, and heart rate monitorsystem 1040 may communicate between or among one another via cable,wires, circuitry, electrical traces, blue tooth, fiber optic lines, RF,IR, or ultrasonic transmitters and receivers. The controller may behoused in the infusion device housing or may have its own housing or maybe included in a supplemental device.

In an embodiment, the insulin delivery system 1060 includes the infusiondevice and an infusion tube to infuse insulin into the body 1070. Inparticular embodiments, the infusion device includes infusion electricalcomponents to activate an infusion motor, an infusion communicationsystem to receive control signals 1051, and an infusion device housingto hold the infusion device.

An example of a glucose sensor system, controller, and insulin pumpsystem is the Paradigm system by Medtronic Minimed or the like. Anexample of a heart rate monitor include the various types of the PolarHeart Rate Monitors or the like.

The modules of the system 1010 may be separate and singular as shown ormay be integral with one another in combination. There may be multiplesystems with any combination of the modules shown. Any combination ofthe modules may exist together in a single housing or in separatehousing. Further, any of the modules of the system 1010 and signal meansmay be duplicated or modified as desired or required for intended use,operation, application or environment.

The method of the invention may be implemented using hardware, softwareor a combination thereof and may be implemented in one or more computersystems or other processing systems, such as a personal digitalassistance (PDAs), equipped with adequate memory and processingcapabilities. In an example embodiment, the invention may be implementedin software running on a general purpose computer 1100 as illustrated inFIG. 11. Computer system 1100 may include one or more processors, suchas processor 1104. Processor 1104 may be connected to a communicationsinfrastructure 1106 (e.g. a communications bus, cross-over bar, ornetwork). Computer system 1100 may include a display interface 1102 thatforwards graphics, text, or other data from the communicationsinfrastructure 1106 (or from a frame buffer not shown) for display onthe display unit 1130. Display unit 1130 may be digital and/or analog.

Computer system 1100 may also include a main memory 1108, preferablyrandom access memory (RAM), and may also include a secondary memory1110. The secondary memory 1110 may include, for example, a hard diskdrive 1112 and/or a removable storage drive 1114, representing a floppydisk drive, a magnetic tape drive, an optical disk drive, a flashmemory, etc. The removable storage drive 1114 reads from and/or writesto a removable storage unit 1118 in a well known manner. Removablestorage unit 1118, represents a floppy disk, magnetic tape, opticaldisc, etc. which is read by and written to by removable storage drive1114. As will be appreciated, the removable storage unit 1118 mayinclude a computer usable storage medium having stored therein computersoftware and/or data.

In alternative embodiments, secondary memory 1110 may include othermeans for allowing computer programs or other instructions to be loadedinto computer system 1100. Such means may include, for example, aremovable storage unit 1122 and an interface 1120. Examples of suchremovable storage units/interfaces include a program cartridge andcartridge interface (such as that found in video game devices), aremovable memory chip (such as a ROM, PROM, EPROM or EEPROM) andassociated socket, and other removable storage units 1122 and interfaces1120 which allow software and data to be transferred from the removablestorage unit 1122 to computer system 1100.

Computer system 1100 may also include a communications interface 1124.Communications interface 1124 allows software and data to be transferredbetween computer system 1100 and external devices. Examples ofcommunications interface 1124 may include a modem, a network interface(such as an Ethernet card), a communications port (e.g., serial orparallel, etc.), a PCMCIA slot and card, etc. Software and datatransferred via communications interface 1124 may be in the form ofsignals 1128 which may be electronic, electromagnetic, optical or othersignals capable of being received by communications interface 1124.Signals 1128 may be provided to communications interface 1124 via acommunications path (i.e., channel) 1126. Channel 1126 carries signals1128 and may be implemented using wire or cable, fiber optics, a phoneline, a cellular phone link, an RF link, an infrared link, and othercommunications channels.

In this document, the terms “computer program medium” and “computerusable medium” are used to generally refer to media such as varioussoftware, firmware, disks, drives, removable storage drive 1114, a harddisk installed in hard disk drive 1112, and signals. These computerprogram products (“computer program medium” and “computer usablemedium”) are means for providing software to computer systems 1100. Theinvention includes such computer program products.

Computer programs (also called computer control logic or computerprogram logic) may be stored in main memory 1108 and/or secondary memory1110. Computer programs may also be received via communicationsinterface 1124. Such computer programs, when executed, enable computersystem 1100 to perform the features of the present invention asdiscussed herein. In particular, the computer programs, when executed,enable processor 1104 to perform the functions of the present invention.Accordingly, such computer programs represent controllers of computersystem 1100. In an embodiment where the invention is implemented usingsoftware, the software may be stored in a computer program product andloaded into computer system 1100 using removable storage drive 1114,hard drive 1112 or communications interface 1124. The control logic(software) or computer program logic (software), when executed by theprocessor 1104, causes the processor 1104 to perform the function of theinvention as described herein.

In another embodiment, the invention is implemented primarily inhardware using, for example, hardware components such as applicationspecific integrated circuits (AS_(I) Cs). Implementation of the hardwarestate machine to perform the functions described herein will be apparentto persons skilled in the relevant art(s).

In yet another embodiment, the invention is implemented using acombination of both hardware and software.

In an example software embodiment of the invention, the methodsdescribed above may be implemented in SPSS control language, but couldbe implemented in other programs, such as, but not limited to, C++program language or other programs available to those skilled in theart.

FIG. 12 provides a simplified flowchart of an aspect of an exemplaryembodiment of the present invention method, system and computer programproduct for detecting physical activity, its duration and intensitythrough HR. Referring to FIG. 12, data is acquired 1271. The datainclude heart rate data, and may include other data such as glucose dataand/or insulin delivery data. Heart rate data may be acquired with, butnot limited to, sampling periods less than or equal to 1 minute,sampling periods less than or equal to about 10 minutes, frequently,sampling periods less than or equal to about 15 minutes. Glucose datamay be acquired frequently, with a sampling period less than or equal toabout 15 minutes, or with other sampling periods. A physical activityindex is then calculated 1272 using the acquired heart rate data.Subsequently or concurrently, the index and heart rate data is used todetect physical activity 1273. Physical activity may be detected at, butare not limited to, the completion of acquiring data, nearcontemporaneously to the latest acquisition data, after the completionof acquiring data, and in real time. It should be appreciated that theaforementioned periods, duration, sequence, timing and/or frequency maybe altered as desired or required.

FIG. 13 provides a simplified flowchart of an aspect of an exemplaryembodiment of the present invention method, system and computer programproduct for quantifying short-term and/or long-term changes in insulinsensitivity due to physical activity. Referring to FIG. 13, followingthe detection of physical activity 1273, the physical activity onglucose demand is evaluated 1374. This may include: evaluating the shortterm changes in glucose demand 1375, evaluating short term changes inglucose demand and long term changes in insulin action 1376, and/orevaluating the long term changes in insulin action 1377. A short termperiod may correspond to, but are not limited to, during and withinabout 15 minutes after physical activity, during and within about 1 hourafter physical activity, during and within about 2 hours after physicalactivity. When evaluating the short term changes in glucose demand, theshort term changes in glucose demand is quantified 1378, for exampleaccording to Eq. 1.3. When evaluating the long term and short termchanges in glucose demand, the long term and short term changes inglucose demand is quantified 1379, for example according to Eq. 1.2.When evaluating the long term changes in glucose demand, the long termchanges in insulin action is quantified 1380, for example according toEq. 1.4. Long term changes correspond to, but are not limited to, atleast about 2 hours after physical activity, during and within about 6hours after physical activity, during and within about 12 hours afterphysical activity, during and within about 24 hours after physicalactivity, and during and at least about 24 hours after physicalactivity. It should be appreciated that the aforementioned periods,duration, sequence, timing and/or frequency may be altered as desired orrequired. It should be appreciated that alternative solutions of theaforementioned equations may be implemented to achieve the objective ofthe present invention.

FIG. 14 provides a simplified flowchart of an aspect of an exemplaryembodiment of the present invention method, system and computer programproduct for computing recommended changes in insulin dose to compensatefor the effects of physical activity on insulin sensitivity. Referringto FIG. 14, following the detection of physical activity 1273, thephysical activity on glucose demand and insulin action is evaluated1481. This may include: evaluating the short term changes in glucosedemand and insulin sensitivity 1482, evaluating short term changes inglucose demand and long term changes in insulin action 1483, and/orevaluating the long term changes in glucose demand and insulin action1484. A short term period may correspond to, but are not limited to,during and within about 15 minutes after physical activity, during andwithin about 1 hour after physical activity, during and within about 2hours after physical activity. When evaluating the short term changes inglucose demand and insulin sensitivity, the short term changes inglucose demand and insulin sensitivity is quantified 1485, for exampleaccording to equation Eq. 1.3. Subsequently, recommendations of insulindosing 1488 are indicated. In both closed loop 1490 and open loop 1489applications, basal pump rates and insulin bolus are reduced. In closedloop systems, the injection schedule for short term glucose changes isgiven by Eq. 3.2. When evaluating the long term and short term changesin glucose demand and insulin sensitivity, the short term changes inglucose demand and long term changes in insulin action is quantified1486, for example according to Eq. 1.2. Subsequently, recommendations ofinsulin dosing 1491 are indicated. In both closed loop 1493 and openloop 1492 applications, basal pump rates and insulin bolus are reduced.In closed loop systems, the injection schedule for long term and shortterm glucose changes is given by Eq. 3. 1. When evaluating the long termchanges in glucose demand and insulin sensitivity, the long term changesin glucose demand and insulin action is quantified 1487, for exampleaccording to Eq. 1.4. Long term changes correspond to, but are notlimited to, at least about 2 hours after physical activity, during andwithin about 6 hours after physical activity, during and within about 12hours after physical activity, during and within about 24 hours afterphysical activity, and during and at least about 24 hours after physicalactivity. Subsequently, recommendations of insulin dosing 1494 areindicated. In both closed loop 1496 and open loop 1495 applications,basal pump rates and insulin bolus are reduced. In closed loop systems,the injection schedule for long term glucose changes is given by Eq.3.3. It should be appreciated that the aforementioned periods, duration,sequence, timing and/or frequency may be altered as desired or required.It should be appreciated that alternative solutions of theaforementioned equations may be implemented to achieve the objective ofthe present invention.

It should be appreciated that various aspects of embodiments of thepresent method, system and computer program product may be implementedwith the following methods, systems and computer program productsdisclosed in the following U.S. Patent Applications, U.S. Patents, andPCT International Patent Applications that are hereby incorporated byreference herein:

1. U.S. Pat. No. 6,572,545 entitled “Method and apparatus for real-timecontrol of physiological parameters;”

2. U.S. Pat. No. 6,399,341 entitled, “Artificial pancreas;”

3. U.S. Pat. No. 6,023,009 entitled, “Artificial pancreas;”

4. U.S. Pat. No. 5,262,055 entitled, “Implantable and refillablebiohybrid artificial pancreas;”

5. U.S. Pat. No. 5,116,494 entitled, “Artificial pancreatic perfusiondevice with temperature sensitive matrix;”

6. U.S. Pat. No. 5,116,493 entitled, “Artificial pancreatic perfusiondevice with reseedable matrix;”

7. U.S. Pat. No. 5,109,866 entitled, “Artificial pancreas;”

8. U.S. Pat. No. 5,009,230 entitled, “Personal glucose monitor;”

9. U.S. Pat. No. 5,002,661 entitled, “Artificial pancreatic perfusiondevice;”

10. U.S. Pat. No. 4,936,317 entitled, “Cardiovascular prosthetic devicesand implants with porous systems;”

11. U.S. Pat. No. 4,901,728 entitled, “Personal glucose monitor;”

12. U.S. Pat. No. 4,805,624 entitled, “Low-potential electrochemicalredox sensors;”

13. U.S. Pat. No. 4,636,144 entitled, “Micro-feed pump for an artificialpancreas;”

14. U.S. Pat. No. 4,627,836 entitled, “Cardiovascular prosthetic devicesand implants with porous systems;”

15. U.S. Pat. No. 4,515,584 entitled, “Artificial pancreas;”

16. U.S. Pat. No. 4,459,252 entitled, “Method of forming a small boreflexible vascular graft involving eluting solvent-elutable particlesfrom a polymeric tubular article;”

17. U.S. Pat. No. 4,374,669 entitled, “Cardiovascular prosthetic devicesand implants with porous systems;”

18. U.S. Pat. No. 4,355,426 entitled, “Porous flexible vascular graft;”

19. U.S. Pat. No. 4,281,669 entitled, “Pacemaker electrode with poroussystem;”

20. U.S. Pat. No. 4,242,460 entitled, “Cell culture device;”

21. U.S. Pat. No. 4,242,459 entitled, “Cell culture device;”

22. U.S. Pat. No. 4,053,952 entitled, “Magnetic fluid actuated controlvalve, relief valve and pump;”

It should be appreciated that various aspects of embodiments of thepresent method, system and computer program product may be implementedwith the following methods, systems and computer program productsdisclosed in the following U.S. Patent Applications, U.S. Patents, andPCT International Patent Applications that are hereby incorporated byreference herein and co-owned with the assignee:

PCT International Application Ser. No. PCT/US2005/013792, filed Apr. 21,2005, entitled “Method, System, and Computer Program Product forEvaluation of the Accuracy of Blood Glucose Monitoring Sensors/Devices;”

U.S. patent application Ser. No. 11/578,831, filed Oct. 18, 2006entitled “Method, System and Computer Program Product for Evaluating theAccuracy of Blood Glucose Monitoring Sensors/Devices;”

PCT International Application Ser. No. PCT/US01/09884, filed Mar. 292001, entitled “Method, System, and Computer Program Product forEvaluation of Glycemic Control in Diabetes Self-Monitoring Data;”

U.S. Pat. No. 7,025,425 B2 issued Apr. 11, 2006, entitled “Method,System, and Computer Program Product for the Evaluation of GlycemicControl in Diabetes from Self-Monitoring Data;”

U.S. patent application Ser. No. 11/305,946 filed Dec. 19, 2005 entitled“Method, System, and Computer Program Product for the Evaluation ofGlycemic Control in Diabetes from Self-Monitoring Data;”

PCT International Application Ser. No. PCT/US2003/025053, filed Aug. 8,2003, entitled “Method, System, and Computer Program Product for theProcessing of Self-Monitoring Blood Glucose (SMBG) Data to EnhanceDiabetic Self-Management;”

U.S. patent application Ser. No. 10/524,094 filed Feb. 9, 2005 entitled“Managing and Processing Self-Monitoring Blood Glucose;”

PCT International Application Ser. No PCT/US2006/033724, filed Aug. 29,2006, entitled “Method for Improvising Accuracy of Continuous GlucoseSensors and a Continuous Glucose Sensor Using the Same;”

PCT International Application No. PCT/US2007/000370, filed Jan. 5, 2007,entitled “Method, System and Computer Program Product for Evaluation ofBlood Glucose Variability in Diabetes from Self-Monitoring Data;”

U.S. patent application Ser. No. 11/925,689, filed Oct. 26, 2007,entitled “For Method, System and Computer Program Product for Real-TimeDetection of Sensitivity Decline in Analyte Sensors;”

PCT International Application No. PCT/US00/22886, filed Aug. 21, 2000,entitled “Method and Apparatus for Predicting the Risk of Hypoglycemia;”

U.S. Pat. No. 6,923,763 B1, issued Aug. 2, 2005, entitled “Method andApparatus for Predicting the Risk of Hypoglycemia;”

PCT International Patent Application No. PCT/US2007/082744, filed Oct.26, 2007, entitled “For Method, System and Computer Program Product forReal-Time Detection of Sensitivity Decline in Analyte Sensors;” and

U.S. patent application Ser. No. 11/943,226, filed Nov. 20, 2007,entitled “Systems, Methods, and Computer Program Codes for Recognitionof Patterns of Hyperglycemia and Hypoglycemia, Increase GlucoseVariability, and Ineffective Self-monitoring in Diabetes.”

References

The following references are hereby incorporated by reference herein:

-   [1]. US Senate hearing: The Potential of an Artificial Pancreas:    Improving Care for People with Diabetes, Sep. 27, 2006.-   [2]. Bergman R N, Ider Y Z, Bowden C R, Cobelli C. Quantitative    estimation of insulin sensitivity. Am J Physiol. 236:E667-E677,    1979.-   [3]. Bergman R N. The minimal model of glucose regulation: a    biography. Advances in Experimental Medicine & Biology 537:1-19,    2003-   [4]. Bergman R N. Zaccaro D J. Watanabe R M. Haffner S M. Saad M F.    Norris J M. Wagenknecht L E. Hokanson J E. Rotter J I. Rich S S.    Minimal model-based insulin sensitivity has greater heritability and    a different genetic basis than homeostasis model assessment or    fasting insulin. Diabetes 52:2168-74, 2003-   [5]. Bergman R N, Finegood D T, Ader M. Assessment of insulin    sensitivity in vivo.

Am J Physiol 236:E667-677, 1985

-   [6]. Caumo A. Bergman R N. Cobelli C. Insulin sensitivity from meal    tolerance tests in normal subjects: a minimal model index. Journal    of Clinical Endocrinology & Metabolism. 85:4396-402, 2000-   [7]. Clausen J O. Borch-Johnsen K. Ibsen H. Bergman R N. Hougaard P.    Winther K. Pedersen O. Insulin sensitivity index, acute insulin    response, and glucose effectiveness in a population-based sample of    380 young healthy Caucasians. Analysis of the impact of gender, body    fat, physical fitness, and life-style factors. Journal of Clinical    Investigation 98:1195-209, 1996-   [8]. Ni T C. Ader M. Bergman R N. Reassessment of glucose    effectiveness and insulin sensitivity from minimal model analysis: a    theoretical evaluation of the single-compartment glucose    distribution assumption. Diabetes 46:1813-21, 1997-   [9]. Welch S. Gebhart S S. Bergman R N. Phillips L S. Minimal model    analysis of intravenous glucose tolerance test-derived insulin    sensitivity in diabetic subjects. Journal of Clinical Endocrinology    & Metabolism 71:1508-18, 1990-   [10]. Bergman R N, Phillips L S, Cobelli C: Physiologic evaluation    of factors controlling glucose tolerance in man: measurement of    insulin sensitivity and beta-cell glucose sensitivity from the    response to intravenous glucose. J Clin Invest 68:1456-1467, 1981-   [11]. Toffolo G, DeGrandi F, Cobelli C: Estimation of β-cell    sensitivity from intravenous glucose tolerance tests C-peptide data.    Diabetes 44: 845-854,1995.-   [12]. Breda E, Cavaghan M K, Toffolo G, Polonsky K S, and Cobelli C.    Oral glucose tolerance test minimal model indexes of beta-cell    function and insulin sensitivity. Diabetes 50:150-158, 2001.-   [13]. Dalla Man C, Caumo A, and Cobelli C. The oral glucose minimal    model: estimation of insulin sensitivity from a meal test. IEEE    Trans Biomed Eng 49: 419-429,2002.-   [14]. Dalla Man C, Caumo A, Basu R, Rizza R, Toffolo G, and    Cobelli C. Minimal model estimation of glucose absorption and    insulin sensitivity from oral test: validation with a tracer method.    Am J Physiol Endocrinol Metab 287: E637-E643, 2004.-   [15]. Dalla Man C, Yarasheski K E, Caumo A, Robertson H, Toffolo G,    Polonsky K S, Cobelli C. Insulin sensitivity by oral glucose minimal    models: validation against clamp. Am J Physiol Endocrinol Metab.    289:E954-9, 2005.-   [16]. Dalla Man C, Campioni M, Polonsky K S, Basu R, Rizza R A,    Toffolo G, Cobelli C. Two-hour seven-sample oral glucose tolerance    test and meal protocol: minimal model assessment of beta-cell    responsivity and insulin sensitivity in nondiabetic individuals.    Diabetes.;54:3265-73, 2005.-   [17]. Basu R, Breda E, Oberg A L, Powell C C, Dalla Man C, Basu A,    Vittone J L, Klee G G, Arora P, Jensen M D, Toffolo G, Cobelli C,    Rizza R A. Mechanisms of the age-associated deterioration in glucose    tolerance: contribution of alterations in insulin secretion, action,    and clearance. Diabetes.;52:1738-48, 2003.-   [18]. Callegari T, Caumo A, Cobelli C. Bayesian two-compartment and    classic single-compartment minimal models: comparison on insulin    modified IVGTT and effect of experiment reduction. IEEE Trans Biomed    Eng.;50:1301-9, 2003.-   [19]. Pillonetto G, Sparacino G, Cobelli C. Numerical    non-identifiability regions of the minimal model of glucose    kinetics: superiority of Bayesian estimation. Math    Biosci.;184:53-67, 2003.-   [20]. Dalla Man C, Caumo A, Basu R, Rizza R, Toffolo G, and    Cobelli C. Measurement of selective effect of insulin on glucose    disposal from labeled glucose oral test minimal model. Am J Physiol    Endocrinol Metab 289: E909-E914,2005-   [21]. J F Brun, R Guintrand-Hurget, C Boegner, O Bouix, and A    Orsetti. Influence of short-term submaximal exercise on parameters    of glucose assimilation analyzed with the minimal model. Metabolism,    44(7):833-840, 1995.-   [22]. L J Goodyear, M F Hirshman, and E S Horton. Exercise-induced    translocation of skeletal muscle glucose transporters. Am J Physiol,    261 :E795-E799, 1991.11-   [23]. J Nygren L Jorfeldt J F P Wojtaszewski S D Dufresne E S Horton    O Ljungqvist L J Goodyear A Thorell, M F Hirshman. Exercise and    insulin cause glut-4 translocation in human skeletal muscle. Am. J.    Physiol., 277:E733-E741, 1999.-   [24]. E. J. Henriksen. Exercise Effects of Muscle Insulin Signaling    and Action: Invited review: Effects of acute exercise and exercise    training on insulin resistance. Journal of applied physiology,    93(2):788-796, 2002.-   [25]. L Dohm. Exercise effects on muscle insulin signaling and    action, invited review: regulation of skeletal muscle glut-4    expression by exercise. J Appl Physiol, 93:782-787, 2002.-   [26]. J M Ren, C F Semenkovich, E A Gulve, J Gao, and J O Holloszy.    Exercise induces rapid increases in glut4 expression, glucose    transport capacity, and insulin-stimulated glycogen storage in    muscle. J Bio Chem, 269:14396-14401, 1994.-   [27]. L B Borghout and H A Keizer. Exercise and insulin sensitivity:    A review. Int J Sports Med, 21:1-12, 2000.-   [28]. L J Goodyear and B B Kahn. Exercise, glucose transport, and    insulin sensitivity. Annu Rev Med, 49:425-461, 1998.-   [29]. Yoichi Hayashi et al. A Single Bout of Exercise at Higher    Intensity Enhances Glucose Effectiveness in Sedentary Men. J Clin    Endocrinol Metab, 90(7):4035-4040, 2005.-   [30]. Y. Nishida et al. Effect of mild exercise training on glucose    effectiveness in healthy men. Diabetes Care, 24:1008-1013, 2001.-   [31]. Y. Nishida et al. Sg, si, egp of exercise-trained middle-aged    men estimated by a two-compartment labelled minimal model Am J    Physiol Endocrinol Metab, 283:E809-E816, 2002.-   [32]. Y. Nishida et al. Effect of Moderate Exercise Training on    Peripheral Glucose Effectiveness, Insulin Sensitivity, and    Endogenous Glucose Production in Healthy Humans Estimated by a    Two-Compartment-Labeled Minimal Model. Diabetes, 53(2):315-320,    2004.-   [33]. S E Kahn et alk. Effect of exercise on insulin action, glucose    tolerance, and insulin secretion in aging. Am J Physiol Endocrino    Metab, 258:E937-E943, 1990.-   [34]. M. Derouich and A. Boutayeb. The effect of physical exercise    on the dynamics of glucose and insulin. Journal of Biomechanics,    35:911-917, 2002.-   [35]. J Kim, G M Saidel, and M E Cabrera. Multiscale computational    model of fuel homeostatsis during exercise. Annals of biomedical    Engineering, 35:69-90, 2007.-   [36]. M. D. Breton, C. Dalla Man, C. R. King, S. Anderson, L.    Farhy, C. Cobelli, and B. P. Kovatchev. Effect of exercise on    insulin action assessed by the minimal model. In Proceedings of the    Diabetes Technology Meeting, Atlanta Ga., 2006.-   [37]. G F Flectcher, G Balady, V F frowlicher, L H Hartley, W L    Haskell, and M L Pollock. Exercise standards : A statement for    healthcare professionals from the american heart association.    Circulation, 91(2):580-615, 1995.-   [38]. Weltman, C. J. Pritzlaff, L. Wideman, J. Y. Weltman, J. L.    Blumer, R. D. Abbott, M. L. Hartman, and J. D. Veldhuis.    Exercise-dependent growth hormone release is linked to markers of    heightened central adrenergic outflow. J Appl Physiol,    89(2):629-635, 2000.-   [39]. B R Londeree, T R Thomas, G Ziogas, T D Smith, and Q Zhang. V    O2max versus HRmax regressions for six modes of exercise. Medecine    and Science in Sports and Exercise, 27(3):458-461, 1995.-   [40]. Eaton, R. P., R. C. Allen, D. S. Schade, K. M. Erickson,    and J. Standefer. Prehepatic insulin production in man: Kinetic    analysis using peripheral connecting peptide behaviour. J. Clin.    Endocrinol. Metab. 51:520-28, 1980.-   [41]. Polonsky, K. S., J. Licinio-Paixao, B. D. Given, W. Pugh, P.    Rue, J. Galloway, T. Karrison, and B. Frank. Use of biosynthetic    human C-peptide in the measurement of insulin secretion rates in    normal volunteers and type I diabetic patients. J. Clin. Invest.    51:98-105, 1986.-   [42]. Hovorka, R., E. Koukkou, D. Southerden, J. K. Powrie, M. A.    Young. Measuring prehepatic insulin secretion using a population    model of C-peptide kinetics: accuracy and required sampling    schedule. Diabetologia. 41:548-554, 1998.-   [43]. Breda, E., and C. Cobelli. Insulin secretion rate during    glucose stimuli: Alternative analyses of C-peptide data. Annals of    Biomedical Engineering, 29:692-700, 2001.-   [44]. Van Cauter, E., F. Mestrez, J. Sturis, and K. S. Polonsky.    Estimation of insulin secretion rates from C-peptide levels.    Diabetes. 41:368-377, 1992.-   [45]. C. Dalla Man, R. A. Rizza, and C. Cobelli. Meal simulation    model of the glucose-insulin system. IEEE Trans Biomed Eng, 2007.-   [46]. M Pagani, F Lombardi, S Guzzetti, O Rimoldi, R Furlan, P    Pizzinelli, G Sandrone, G Malfatto, S Dell'Orto, and E Piccaluga    Power spectral analysis of heart rate and arterial pressure    variabilities as a marker of sympatho-vagal interaction in man and    conscious dog, Circ. Res.; 59: 178-193, August 1986-   [47]. Yamamoto, R. L. Hughson, and J. C. Peterson, Autonomic control    of heart rate during exercise studied by heart rate variability    spectral analysis, J Appl Physiol 71: 1136-1142, 1991.

In summary, while the present invention has been described with respectto specific embodiments, many modifications, variations, alterations,substitutions, and equivalents will be apparent to those skilled in theart. The present invention is not to be limited in scope by the specificembodiment described herein. Indeed, various modifications of thepresent invention, in addition to those described herein, will beapparent to those of skill in the art from the foregoing description andaccompanying drawings. Accordingly, the invention is to be considered aslimited only by the spirit and scope of the following claims, includingall modifications and equivalents.

Still other embodiments will become readily apparent to those skilled inthis art from reading the above-recited detailed description anddrawings of certain exemplary embodiments. It should be understood thatnumerous variations, modifications, and additional embodiments arepossible, and accordingly, all such variations, modifications, andembodiments are to be regarded as being within the spirit and scope ofthis application. For example, regardless of the content of any portion(e.g., title, field, background, summary, abstract, drawing figure,etc.) of this application, unless clearly specified to the contrary,there is no requirement for the inclusion in any claim herein or of anyapplication claiming priority hereto of any particular described orillustrated activity or element, any particular sequence of suchactivities, or any particular interrelationship of such elements.Moreover, any activity can be repeated, any activity can be performed bymultiple entities, and/or any element can be duplicated. Further, anyactivity or element can be excluded, the sequence of activities canvary, and/or the interrelationship of elements can vary. Unless clearlyspecified to the contrary, there is no requirement for any particulardescribed or illustrated activity or element, any particular sequence orsuch activities, any particular size, speed, material, dimension orfrequency, or any particularly interrelationship of such elements.Accordingly, the descriptions and drawings are to be regarded asillustrative in nature, and not as restrictive. Moreover, when anynumber or range is described herein, unless clearly stated otherwise,that number or range is approximate. When any range is described herein,unless clearly stated otherwise, that range includes all values thereinand all sub ranges therein. Any information in any material (e.g., aUnited States/foreign patent, United States/foreign patent application,book, article, etc.) that has been incorporated by reference herein, isonly incorporated by reference to the extent that no conflict existsbetween such information and the other statements and drawings set forthherein. In the event of such conflict, including a conflict that wouldrender invalid any claim herein or seeking priority hereto, then anysuch conflicting information in such incorporated by reference materialis specifically not incorporated by reference herein.

1. A method for detecting physical activity and its effects on metabolicdemand, said method comprising: detecting onset of the physical activityusing changes in heart rate data.
 2. The method of claim 1, furthercomprising: acquiring heart rate data.
 3. The method of claim 2, whereinsaid detection of physical activity comprising: transforming said heartrate data; computing an index to detect physical activity based onresults of said transformation; and detecting physical activity usingsaid index and said heart rate data.
 4. The method of claim 3, whereinsaid index is calculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{11mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 5. Themethod of claim 2, wherein said detection of onset of physical activityoccurs at the completion of acquiring said heart rate data.
 6. Themethod of claim 2, wherein said detection of onset of physical activityoccurs near contemporaneously to the latest acquisition of said heartrate data.
 7. The method of claim 2, wherein said detection of onset ofphysical activity occurs after the completion of acquiring said heartrate data.
 8. The method of claim 2, wherein said detection of onset ofphysical activity occurs in real time.
 9. The method of claim 1, furthercomprising: evaluating effects of physical activity on glucose demand.10. The method of claim 9, further comprising: acquiring glucose dataand heart rate data.
 11. The method of claim 10, wherein said detectionof physical activity comprising: transforming said heart rate data;computing an index to detect physical activity based on results of saidtransformation; and detecting physical activity using said index andsaid heart rate data.
 12. The method of claim 11, wherein said index iscalculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{11mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 13. Themethod of claim 10, wherein said heart rate data is acquired frequently.14. The method of claim 10, wherein said heart rate data is acquiredwith a sampling period less than or equal to about 1 minute.
 15. Themethod of claim 10, wherein said heart rate data is acquired with asampling period less than or equal to about 10 minutes.
 16. The methodof claim 10, wherein said glucose data is acquired frequently.
 17. Themethod of claim 10, wherein said glucose data is acquired with asampling period less than or equal to about 15 minutes.
 18. The methodof claim 9, wherein said evaluation comprising: calculating deviationsof heart rate values and blood glucose values from basal heart ratevalues and basal blood glucose values; calculating a quantitativemeasure of short-term change in glucose demand due to said physicalactivity; and calculating a short term change in metabolic demand. 19.The method of claim 18, wherein said short term effects correspond toduring and within about 15 minutes after physical activity.
 20. Themethod of claim 18, wherein said short term effects correspond to duringand within about 1 hour after physical activity.
 21. The method of claim18, wherein said short term effects correspond to during and withinabout 2 hour after physical activity.
 22. The method of claim 18,wherein said quantitative measure of short term change in glucose demandis calculated as: $\{ {\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3)\end{matrix}\quad} $ wherein: G represents glucose value, G_(b)is basal glucose value, X is insulin dependent action, D representsglucose input, V is the diffusion volume, I is the insulin value, I_(b)represents basal insulin value, Y represents the transient variation inmetabolic activity β represents the short term metabolic demand to heartrate ratio, HR represents heart rate, HR_(b) represents basal heartrate, p₁ represents the balance between liver production/demand andinsulin independent glucose demand, τ_(HR) represents the lag betweenonset of physical activity and changes in metabolic demand, p₂represents the lag between appearance of insulin and action of insulin,and p₃ represents the intensity of insulin action.
 23. The method ofclaim 9, wherein said evaluation comprising: calculating deviations ofheart rate values and blood glucose values from basal heart rate valuesand basal blood glucose values; calculating a quantitative measure oflong-term change in glucose demand due to said physical activity; andcalculating a long term change in metabolic demand.
 24. The method ofclaim 23, wherein said long term effects correspond to at least about 2hours after physical activity.
 25. The method of claim 23, wherein saidlong term effects correspond to during and within about 6 hours afterphysical activity.
 26. The method of claim 23, wherein said long termeffects correspond to during and within about 12 hours after physicalactivity.
 27. The method of claim 23, wherein said long term effectscorrespond to during and within about 24 hours after physical activity.28. The method of claim 23, wherein said long term effects correspond toduring and at least about 24 hours after physical activity.
 29. Themethod of claim 23, wherein said quantitative measure of long termchange in insulin action is calculated as: $\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 30. The method of claim 9, wherein saidevaluation comprising: calculating deviations of heart rate values andblood glucose values from basal heart rate values and basal bloodglucose values; calculating a quantitative measure of short-term changein glucose demand due to said physical activity; calculating aquantitative measure of long-term change in glucose demand due to saidphysical activity; and calculating a change in metabolic demand.
 31. Themethod of claim 30, wherein said short term effects correspond to duringand within about 15 minutes after physical activity.
 32. The method ofclaim 30, wherein said short term effects correspond to during andwithin about 1 hour after physical activity.
 33. The method of claim 30,wherein said short term effects correspond to during and within about 2hour after physical activity.
 34. The method of claim 30, wherein saidlong-term effects correspond to at least about 2 hours after physicalactivity.
 35. The method of claim 30, wherein said long-term effectscorrespond to within about 6 hours after physical activity.
 36. Themethod of claim 30, wherein said long-term effects correspond to withinabout 12 hours after physical activity.
 37. The method of claim 30,wherein said long-term effects correspond to within about 24 hours afterphysical activity.
 38. The method of claim 30, wherein said long-termeffects correspond to about at least 24 hours after physical activity.39. The method of claim 30, wherein said quantitative measure ofshort-term change and long-term change in glucose demand is calculatedas: $\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y} + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, n represents the steepness of theaforementioned threshold.
 40. The method of claim 1, further comprising:evaluating changes in insulin sensitivity and glucose demand due to thephysical activity; and indicating recommendations of insulin dosing. 41.The method of claim 40, further comprising: acquiring glucose data,insulin delivery data and heart rate data.
 42. The method of claim 41,wherein said detection of physical activity comprising: transformingsaid heart rate data; computing an index to detect physical activitybased on results of said transformation; and detecting physical activityusing said index and said heart rate data.
 43. The method of claim 42,wherein said index is calculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{11mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 44. Themethod of claim 41, wherein said glucose data is continuous.
 45. Themethod of claim 41, wherein said heart rate data is acquired frequently.46. The method of claim 41, wherein said heart rate data is acquiredwith a sampling period less than or equal to 1 minute.
 47. The method ofclaim 41, wherein said heart rate data is acquired with a samplingperiod less than or equal to about 10 minutes.
 48. The method of claim41, wherein said glucose data is acquired frequently.
 49. The method ofclaim 41, wherein said glucose data is acquired with a sampling periodless than or equal to 15 minutes.
 50. The method of claim 41, whereinsaid indication of recommendation of insulin dosing occurs about 24hours of acquisition of said heart rate data, said insulin deliverydata, and said glucose data.
 51. The method of claim 41, wherein saidindication of recommendation of insulin dosing occurs within about 12hours of acquiring said heart rate data, said insulin said deliverydata, and said glucose data.
 52. The method of claim 41, wherein saidindication of recommendation of insulin dosing occurs within about 6hours of acquiring said heart rate data, said insulin delivery data, andsaid glucose data.
 53. The method of claim 41, wherein said indicationof recommendation of insulin dosing occurs at the completion ofacquiring said heart rate data, said insulin delivery data, and saidglucose data.
 54. The method of claim 41, wherein said indication ofrecommendation of insulin dosing occurs near contemporaneously to thelatest acquisition of said heart rate data, said insulin delivery data,and said glucose data.
 55. The method of claim 41, wherein saidindication of recommendation of insulin dosing occurs after thecompletion of acquiring said heart rate data, said insulin deliverydata, and said glucose data.
 56. The method of claim 40, wherein saidindication of recommendation of insulin dosing occurs in real time. 57.The method of claim 40, wherein said evaluation comprising: calculatingdeviations of heart rate values and blood glucose values from basalheart rate values and basal blood glucose values; calculating aquantitative measure of short-term change in glucose demand and insulinsensitivity due to said physical activity; and calculating a short termchange in metabolic demand.
 58. The method of claim 57, wherein saidshort term effects correspond to within about 1 hour after physicalactivity.
 59. The method of claim 57, wherein said short term effectscorrespond to during and within about 15 minutes after physicalactivity.
 60. The method of claim 57, wherein said short term effectscorrespond to within about 2 hours after physical activity.
 61. Themethod of claim 57, wherein said quantitative measure of short-termchange in glucose demand and insulin sensitivity is calculated as:$\{ {\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3)\end{matrix}\quad} $ wherein G represents glucose value, G_(b) isbasal glucose value, X is insulin dependent action, D represents glucoseinput, V is the diffusion volume, I is the insulin value, I_(b)represents basal insulin value, Y represents the transient variation inmetabolic activity β represents the short term metabolic demand to heartrate ratio, HR represents heart rate, HR_(b) represents basal heartrate, p₁ represents the balance between liver production/demand andinsulin independent glucose demand, τ_(HR) represents the lag betweenonset of physical activity and changes in metabolic demand, p₂represents the lag between appearance of insulin and action of insulin,and p₃ represents the intensity of insulin action.
 62. The method ofclaim 40, wherein said recommendations of insulin dosing comprising oneor more of the following: calculating a quantitative measure ofshort-term changes in glucose demand and insulin sensitivity due tophysical activity; reducing basal pump rate; and reducing insulin bolus.63. The method of claim 40, wherein said recommendations of insulindosing comprising one or more of the following: calculating quantitativemeasures of short-term changes in glucose demand and insulinsensitivity; adapting a closed loop insulin prescription; reducing basalpump rate; and reducing insulin bolus.
 64. The method of claim 63,wherein said adaptation of closed loop insulin prescription comprise ofcalculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\beta \; {Y(t)}}} + {\frac{\beta \; {Y(t)}}{1 + {\beta \; {Y(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Y(t) represents the transient variation in metabolic activityJ_(b) is injection needed to obtain the plasma concentration I_(b), βrepresents the short term metabolic demand to heart rate ratio.
 65. Themethod of claim 40, wherein said evaluation comprising: calculatingdeviations of heart rate values and blood glucose values from basalheart rate values and basal blood glucose values; calculating aquantitative measure of long-term change in glucose demand and insulinsensitivity due to said physical activity; and calculating a long-termchange in metabolic demand.
 66. The method of claim 65, wherein saidlong-term effects correspond to about at least 2 hours after physicalactivity.
 67. The method of claim 65, wherein said long-term effectscorrespond to within about 6 hours after physical activity.
 68. Themethod of claim 65, wherein said long-term effects correspond to withinabout 12 hours after physical activity.
 69. The method of claim 65,wherein said long-term effects correspond to within about 24 hours afterphysical activity.
 70. The method of claim 65, wherein said long-termeffects correspond to about at least 24 hours after physical activity.71. The method of claim 65, wherein said quantitative measure of longterm change in glucose demand and insulin action is calculated as:$\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 72. The method of claim 40, wherein saidrecommendations of insulin dosing comprising one or more of thefollowing: calculating a quantitative measure of long-term changes inglucose demand and insulin sensitivity due to physical activity;reducing basal pump rate; and reducing insulin bolus.
 73. The method ofclaim 40, wherein said recommendations of insulin dosing comprising oneor more of the following: calculating a quantitative measures oflong-term changes in glucose demand and insulin sensitivity; adapting aclosed loop insulin prescription; reducing basal pump rate; and reducinginsulin bolus.
 74. The method of claim 73, wherein said adaptation ofclosed loop insulin prescription comprise of calculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\alpha \; {Z(t)}}} + {\frac{\alpha \; {Z(t)}}{1 + {\alpha \; {Z(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Z(t) is the long-term change in insulin sensitivity due tophysical activity at time t, J_(b) is injection needed to obtain theplasma concentration I_(b), and α is the long term change in amplitude.75. The method of claim 40, wherein said evaluation comprising:calculating deviations of heart rate values and blood glucose valuesfrom basal heart rate values and basal blood glucose values; calculatinga quantitative measure of short-term change in glucose demand andinsulin sensitivity due to said physical activity; calculating aquantitative measure of long-term change in glucose demand and insulinsensitivity due to said physical activity; and calculating a change inmetabolic demand.
 76. The method of claim 75, wherein said short termeffects correspond to within about 1 hour after physical activity. 77.The method of claim 75, wherein said short term effects correspond toduring and within about 15 minutes after physical activity.
 78. Themethod of claim 75, wherein said short term effects correspond to withinabout 2 hours after physical activity.
 79. The method of claim 75,wherein said long-term effects correspond to about at least 2 hoursafter physical activity.
 80. The method of claim 75, wherein saidlong-term effects correspond to within about 6 hours after physicalactivity.
 81. The method of claim 75, wherein said long-term effectscorrespond to within about 12 hours after physical activity.
 82. Themethod of claim 75, wherein said long-term effects correspond to withinabout 24 hours after physical activity.
 83. The method of claim 75,wherein said long-term effects correspond to about at least 24 hoursafter physical activity.
 84. The method of claim 75, wherein saidquantitative measure of short-term change and said quantitative measureof long-term change in glucose demand and insulin sensitivity iscalculated as: $\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y} + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand p₂ represents the lag between appearance of insulin andaction of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 85. The method of claim 40, wherein saidrecommendations of insulin dosing comprising one or more of thefollowing: calculating a quantitative measure of said long-term changesand said short-term changes in glucose demand and insulin sensitivitydue to physical activity; reducing basal pump rate; and reducing insulinbolus.
 86. The method of claim 40, wherein said recommendations ofinsulin dosing comprising one or more of the following: calculating aquantitative measures of short-term changes and long-term changes inglucose demand and insulin sensitivity; adapting a closed loop insulinprescription; reducing basal pump rate; and reducing insulin bolus. 87.The method of claim 86, wherein said adaptation of closed loop insulinprescription comprise of calculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\alpha \; {Z(t)}} + {\beta \; {Y(t)}}} + {\frac{{\alpha \; {Z(t)}} + {\beta \; {Y(t)}}}{1 + {\alpha \; {Z(t)}} + {\beta \; {Y(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Z(t) is the long-term change in insulin sensitivity due tophysical activity at time t, Y(t) r represents the transient variationin metabolic activity at time t J_(b) is injection needed to obtain theplasma concentration I_(b), β represents the short term metabolic demandto heart rate ratio, and α is the long term change in amplitude.
 88. Asystem for detecting physical activity and its effects on metabolicdemand, said system comprising: a processor programmed to detect onsetof the physical activity using changes in heart rate data.
 89. Thesystem of claim 88, further comprising: an acquisition module acquiringheart rate data.
 90. The system of claim 89, wherein said detection ofphysical activity comprising: transforming said heart rate data;computing an index to detect physical activity based on results of saidtransformation; and detecting physical activity using said index andsaid heart rate data.
 91. The system of claim 90, wherein said index iscalculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 92. Thesystem of claim 89, wherein said detection of onset of physical activityoccurs at the completion of acquiring said heart rate data.
 93. Thesystem of claim 89, wherein said detection of onset of physical activityoccurs near contemporaneously to the latest acquisition of said heartrate data.
 94. The system of claim 89, wherein said detection of onsetof physical activity occurs after the completion of acquiring said heartrate data.
 95. The system of claim 89, wherein said detection of onsetof physical activity occurs in real time.
 96. The system of claim 88,wherein the processor is programmed to further: evaluate effects ofphysical activity on glucose demand.
 97. The system of claim 96, furthercomprising: an acquisition module acquiring glucose data and anacquisition module acquiring heart rate data.
 98. The system of claim97, wherein said detection of physical activity comprising: transformingsaid heart rate data; computing an index to detect physical activitybased on results of said transformation; and detecting physical activityusing said index and said heart rate data.
 99. The system of claim 98,wherein said index is calculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 100. Thesystem of claim 97, wherein said heart rate data is acquired frequently.101. The system of claim 97, wherein said heart rate data is acquiredwith a sampling period less than or equal to about 1 minute.
 102. Thesystem of claim 97, wherein said heart rate data is acquired with asampling period less than or equal to about 10 minutes.
 103. The systemof claim 97, wherein said glucose data is acquired frequently.
 104. Thesystem of claim 97, wherein said glucose data is acquired with asampling period less than or equal to about 15 minutes.
 105. The systemof claim 96, wherein said evaluation comprising: calculating deviationsof heart rate values and blood glucose values from basal heart ratevalues and basal blood glucose values; calculating a quantitativemeasure of short-term change in glucose demand due to said physicalactivity; and calculating a short term change in metabolic demand. 106.The system of claim 105, wherein said short term effects correspond toduring and within about 15 minutes after physical activity.
 107. Thesystem of claim 105, wherein said short term effects correspond toduring and within about 1 hour after physical activity.
 108. The systemof claim 105, wherein said short term effects correspond to during andwithin about 2 hour after physical activity.
 109. The system of claim105, wherein said quantitative measure of short term change in glucosedemand is calculated as: $\{ {\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3)\end{matrix}\quad} $ wherein: G represents glucose value, G_(b)is basal glucose value, X is insulin dependent action, D representsglucose input, V is the diffusion volume, I is the insulin value, I_(b)represents basal insulin value, Y represents the transient variation inmetabolic activity β represents the short term metabolic demand to heartrate ratio, HR represents heart rate, HR_(b) represents basal heartrate, p₁ represents the balance between liver production/demand andinsulin independent glucose demand, τ_(HR) represents the lag betweenonset of physical activity and changes in metabolic demand, p₂represents the lag between appearance of insulin and action of insulin,and p₃ represents the intensity of insulin action.
 110. The system ofclaim 105, wherein said evaluation comprising: calculating deviations ofheart rate values and blood glucose values from basal heart rate valuesand basal blood glucose values; calculating a quantitative measure oflong-term change in glucose demand due to said physical activity; andcalculating a long term change in metabolic demand.
 111. The system ofclaim 110, wherein said long term effects correspond to at least about 2hours after physical activity.
 112. The system of claim 110, whereinsaid long term effects correspond to during and within about 6 hoursafter physical activity.
 113. The system of claim 110, wherein said longterm effects correspond to during and within about 12 hours afterphysical activity.
 114. The system of claim 110, wherein said long termeffects correspond to during and within about 24 hours after physicalactivity.
 115. The system of claim 110, wherein said long term effectscorrespond to during and at least about 24 hours after physicalactivity.
 116. The system of claim 23, wherein said quantitative measureof long term change in insulin action is calculated as:$\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 117. The system of claim 96, wherein saidevaluation comprising: calculating deviations of heart rate values andblood glucose values from basal heart rate values and basal bloodglucose values; calculating a quantitative measure of short-term changein glucose demand due to said physical activity; calculating aquantitative measure of long-term change in glucose demand due to saidphysical activity; and calculating a change in metabolic demand. 118.The system of claim 117, wherein said short term effects correspond toduring and within about 15 minutes after physical activity.
 119. Thesystem of claim 117, wherein said short term effects correspond toduring and within about 1 hour after physical activity.
 120. The systemof claim 117, wherein said short term effects correspond to during andwithin about 2 hour after physical activity.
 121. The system of claim117, wherein said long-term effects correspond to at least about 2 hoursafter physical activity.
 122. The system of claim 117, wherein saidlong-term effects correspond to within about 6 hours after physicalactivity.
 123. The system of claim 117, wherein said long-term effectscorrespond to within about 12 hours after physical activity.
 124. Thesystem of claim 117, wherein said long-term effects correspond to withinabout 24 hours after physical activity.
 125. The system of claim 117,wherein said long-term effects correspond to about at least 24 hoursafter physical activity.
 126. The system of claim 117, wherein saidquantitative measure of short-term change and long-term change inglucose demand is calculated as: $\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y} + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, n represents the steepness of theaforementioned threshold.
 127. The system of claim 88, furthercomprising: a processor programmed to: evaluate changes in insulinsensitivity and glucose demand due to the physical activity; andindicate recommendations of insulin dosing.
 128. The system of claim127, further comprising: an acquisition module acquiring glucose data,insulin delivery data and heart rate data.
 129. The system of claim 128,wherein said detection of physical activity comprising: transformingsaid heart rate data; computing an index to detect physical activitybased on results of said transformation; and detecting physical activityusing said index and said heart rate data.
 130. The system of claim 129,wherein said index is calculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 131. Thesystem of claim 128, wherein said glucose data is continuous.
 132. Thesystem of claim 128, wherein said heart rate data is acquiredfrequently.
 133. The system of claim 128, wherein said heart rate datais acquired with a sampling period less than or equal to 1 minute. 134.The system of claim 128, wherein said heart rate data is acquired with asampling period less than or equal to about 10 minutes.
 135. The systemof claim 128, wherein said glucose data is acquired frequently.
 136. Thesystem of claim 41, wherein said glucose data is acquired with asampling period less than or equal to 15 minutes.
 137. The system ofclaim 128, wherein said indication of recommendation of insulin dosingoccurs about 24 hours of acquisition of said heart rate data, saidinsulin delivery data, and said glucose data.
 138. The system of claim128, wherein said indication of recommendation of insulin dosing occurswithin about 12 hours of acquiring said heart rate data, said insulinsaid delivery data, and said glucose data.
 139. The system of claim 128,wherein said indication of recommendation of insulin dosing occurswithin about 6 hours of acquiring said heart rate data, said insulindelivery data, and said glucose data.
 140. The system of claim 128,wherein said indication of recommendation of insulin dosing occurs atthe completion of acquiring said heart rate data, said insulin deliverydata, and said glucose data.
 141. The system of claim 128, wherein saidindication of recommendation of insulin dosing occurs nearcontemporaneously to the latest acquisition of said heart rate data,said insulin delivery data, and said glucose data.
 142. The system ofclaim 128, wherein said indication of recommendation of insulin dosingoccurs after the completion of acquiring said heart rate data, saidinsulin delivery data, and said glucose data.
 143. The system of claim127, wherein said indication of recommendation of insulin dosing occursin real time.
 144. The system of claim 127, wherein said evaluationcomprising: calculating deviations of heart rate values and bloodglucose values from basal heart rate values and basal blood glucosevalues; calculating a quantitative measure of short-term change inglucose demand and insulin sensitivity due to said physical activity;and calculating a short term change in metabolic demand.
 145. The systemof claim 144, wherein said short term effects correspond to within about1 hour after physical activity.
 146. The system of claim 144, whereinsaid short term effects correspond to during and within about 15 minutesafter physical activity.
 147. The system of claim 144, wherein saidshort term effects correspond to within about 2 hours after physicalactivity.
 148. The system of claim 144, wherein said quantitativemeasure of short-term change in glucose demand and insulin sensitivityis calculated as: $\{ {\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3)\end{matrix}\quad} $ wherein G represents glucose value, G_(b) isbasal glucose value, X is insulin dependent action, D represents glucoseinput, V is the diffusion volume, I is the insulin value, I_(b)represents basal insulin value, Y represents the transient variation inmetabolic activity β represents the short term metabolic demand to heartrate ratio, HR represents heart rate, HR_(b) represents basal heartrate, p₁ represents the balance between liver production/demand andinsulin independent glucose demand, τ_(HR) represents the lag betweenonset of physical activity and changes in metabolic demand, p₂represents the lag between appearance of insulin and action of insulin,and p₃ represents the intensity of insulin action.
 149. The system ofclaim 127, wherein said recommendations of insulin dosing comprising oneor more of the following: calculating a quantitative measure ofshort-term changes in glucose demand and insulin sensitivity due tophysical activity; reducing basal pump rate; and reducing insulin bolus.150. The system of claim 127, wherein said recommendations of insulindosing comprising one or more of the following: calculating quantitativemeasures of short-term changes in glucose demand and insulinsensitivity; and adapting a closed loop insulin prescription for aninsulin delivery system to: reduce basal pump rate and reduce insulinbolus.
 151. The system of claim 150, wherein said adaptation of closedloop insulin prescription comprise of calculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\beta \; {Y(t)}}} + {\frac{\beta \; {Y(t)}}{1 + {\beta \; {Y(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Y(t) represents the transient variation in metabolic activityJ_(b) is injection needed to obtain the plasma concentration I_(b), βrepresents the short term metabolic demand to heart rate ratio.
 152. Thesystem of claim 127, wherein said evaluation comprising: calculatingdeviations of heart rate values and blood glucose values from basalheart rate values and basal blood glucose values; calculating aquantitative measure of long-term change in glucose demand and insulinsensitivity due to said physical activity; and calculating a long-termchange in metabolic demand.
 153. The system of claim 152, wherein saidlong-term effects correspond to about at least 2 hours after physicalactivity.
 154. The system of claim 152, wherein said long-term effectscorrespond to within about 6 hours after physical activity.
 155. Thesystem of claim 152, wherein said long-term effects correspond to withinabout 12 hours after physical activity.
 156. The system of claim 152,wherein said long-term effects correspond to within about 24 hours afterphysical activity.
 157. The system of claim 152, wherein said long-termeffects correspond to about at least 24 hours after physical activity.158. The system of claim 152, wherein said quantitative measure of longterm change in glucose demand and insulin action is calculated as:$\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 159. The system of claim 127, wherein saidrecommendations of insulin dosing comprising one or more of thefollowing: calculating a quantitative measure of long-term changes inglucose demand and insulin sensitivity due to physical activity;reducing basal pump rate; and reducing insulin bolus.
 160. The system ofclaim 127, wherein said recommendations of insulin dosing comprising oneor more of the following: calculating a quantitative measures oflong-term changes in glucose demand and insulin sensitivity; andadapting a closed loop insulin prescription for an insulin deliverysystem to: reduce basal pump rate and reduce insulin bolus.
 161. Thesystem of claim 160, wherein said adaptation of closed loop insulinprescription comprise of calculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\alpha \; {Z(t)}}} + {\frac{\alpha \; {Z(t)}}{1 + {\alpha \; {Z(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Z(t) is the long-term change in insulin sensitivity due tophysical activity at time t, J_(b) is injection needed to obtain theplasma concentration I_(b), and α is the long term change in amplitude.162. The system of claim 127, wherein said evaluation comprising:calculating deviations of heart rate values and blood glucose valuesfrom basal heart rate values and basal blood glucose values; calculatinga quantitative measure of short-term change in glucose demand andinsulin sensitivity due to said physical activity; calculating aquantitative measure of long-term change in glucose demand and insulinsensitivity due to said physical activity; and calculating a change inmetabolic demand.
 163. The system of claim 162, wherein said short termeffects correspond to within about 1 hour after physical activity. 164.The system of claim 162, wherein said short term effects correspond toduring and within about 15 minutes after physical activity.
 165. Thesystem of claim 162, wherein said short term effects correspond towithin about 2 hours after physical activity.
 166. The system of claim162, wherein said long-term effects correspond to about at least 2 hoursafter physical activity.
 167. The system of claim 162, wherein saidlong-term effects correspond to within about 6 hours after physicalactivity.
 168. The system of claim 162, wherein said long-term effectscorrespond to within about 12 hours after physical activity.
 169. Thesystem of claim 162, wherein said long-term effects correspond to withinabout 24 hours after physical activity.
 170. The system of claim 162,wherein said long-term effects correspond to about at least 24 hoursafter physical activity.
 171. The system of claim 162, wherein saidquantitative measure of short-term change and said quantitative measureof long-term change in glucose demand and insulin sensitivity iscalculated as: $\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y} + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand p₂ represents the lag between appearance of insulin andaction of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 172. The system of claim 127, wherein saidrecommendations of insulin dosing comprising one or more of thefollowing: calculating a quantitative measure of said long-term changesand said short-term changes in glucose demand and insulin sensitivitydue to physical activity; reducing basal pump rate; and reducing insulinbolus.
 173. The system of claim 127, wherein said recommendations ofinsulin dosing comprising one or more of the following: calculating aquantitative measures of short-term changes and long-term changes inglucose demand and insulin sensitivity; and adapting a closed loopinsulin prescription for an insulin delivery system to: reduce basalpump rate and reduce insulin bolus.
 174. The system of claim 173,wherein said adaptation of closed loop insulin prescription comprise ofcalculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\alpha \; {Z(t)}} + {\beta \; {Y(t)}}} + {\frac{{\alpha \; {Z(t)}} + {\beta \; {Y(t)}}}{1 + {\alpha \; {Z(t)}} + {\beta \; {Y(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Z(t) is the long-term change in insulin sensitivity due tophysical activity at time t, Y(t) r represents the transient variationin metabolic activity at time t J_(b) is injection needed to obtain theplasma concentration I_(b), β represents the short term metabolic demandto heart rate ratio, and α is the long term change in amplitude.
 175. Acomputer program product comprising a computer useable medium havingcomputer program logic for enabling at least one processor in a computersystem to detect physical activity and its effects on metabolic demand,said computer program logic comprising: detecting onset of the physicalactivity using changes in heart rate data.
 176. The computer programproduct of claim 175, further comprising: acquiring heart rate data.177. The computer program product of claim 176, wherein said detectionof physical activity comprising: transforming said heart rate data;computing an index to detect physical activity based on results of saidtransformation; and detecting physical activity using said index andsaid heart rate data.
 178. The computer program product of claim 177,wherein said index is calculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 179. Thecomputer program product of claim 176, wherein said detection of onsetof physical activity occurs at the completion of acquiring said heartrate data.
 180. The computer program product of claim 176, wherein saiddetection of onset of physical activity occurs near contemporaneously tothe latest acquisition of said heart rate data.
 181. The computerprogram product of claim 176, wherein said detection of onset ofphysical activity occurs after the completion of acquiring said heartrate data.
 182. The computer program product of claim 176, wherein saiddetection of onset of physical activity occurs in real time.
 183. Thecomputer program product of claim 175, further comprising: evaluatingeffects of physical activity on glucose demand.
 184. The computerprogram product of claim 183, further comprising: acquiring glucose dataand heart rate data.
 185. The computer program product of claim 184,wherein said detection of physical activity comprising: transformingsaid heart rate data; computing an index to detect physical activitybased on results of said transformation; and detecting physical activityusing said index and said heart rate data.
 186. The computer programproduct of claim 185, wherein said index is calculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 187. Thecomputer program product of claim 184, wherein said heart rate data isacquired frequently.
 188. The computer program product of claim 184,wherein said heart rate data is acquired with a sampling period lessthan or equal to about 1 minute.
 189. The computer program product ofclaim 184, wherein said heart rate data is acquired with a samplingperiod less than or equal to about 10 minutes.
 190. The computer programproduct of claim 184, wherein said glucose data is acquired frequently.191. The computer program product of claim 184, wherein said glucosedata is acquired with a sampling period less than or equal to about 15minutes.
 192. The computer program product of claim 183, wherein saidevaluation comprising: calculating deviations of heart rate values andblood glucose values from basal heart rate values and basal bloodglucose values; calculating a quantitative measure of short-term changein glucose demand due to said physical activity; and calculating a shortterm change in metabolic demand.
 193. The computer program product ofclaim 192, wherein said short term effects correspond to during andwithin about 15 minutes after physical activity.
 194. The computerprogram product of claim 192, wherein said short term effects correspondto during and within about 1 hour after physical activity.
 195. Thecomputer program product of claim 192, wherein said short term effectscorrespond to during and within about 2 hour after physical activity.196. The computer program product of claim 192, wherein saidquantitative measure of short term change in glucose demand iscalculated as: $\{ {\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3)\end{matrix}\quad} $ wherein: G represents glucose value, G_(b)is basal glucose value, X is insulin dependent action, D representsglucose input, V is the diffusion volume, I is the insulin value, I_(b)represents basal insulin value, Y represents the transient variation inmetabolic activity β represents the short term metabolic demand to heartrate ratio, HR represents heart rate, HR_(b) represents basal heartrate, p₁ represents the balance between liver production/demand andinsulin independent glucose demand, τ_(HR) represents the lag betweenonset of physical activity and changes in metabolic demand, p₂represents the lag between appearance of insulin and action of insulin,and p₃ represents the intensity of insulin action.
 197. The computerprogram product of claim 183, wherein said evaluation comprising:calculating deviations of heart rate values and blood glucose valuesfrom basal heart rate values and basal blood glucose values; calculatinga quantitative measure of long-term change in glucose demand due to saidphysical activity; and calculating a long term change in metabolicdemand.
 198. The computer program product of claim 197, wherein saidlong term effects correspond to at least about 2 hours after physicalactivity.
 199. The computer program product of claim 197, wherein saidlong term effects correspond to during and within about 6 hours afterphysical activity.
 200. The computer program product of claim 197,wherein said long term effects correspond to during and within about 12hours after physical activity.
 201. The computer program product ofclaim 197, wherein said long term effects correspond to during andwithin about 24 hours after physical activity.
 202. The computer programproduct of claim 197, wherein said long term effects correspond toduring and at least about 24 hours after physical activity.
 203. Thecomputer program product of claim 197, wherein said quantitative measureof long term change in insulin action is calculated as:$\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 204. The computer program product of claim183, wherein said evaluation comprising: calculating deviations of heartrate values and blood glucose values from basal heart rate values andbasal blood glucose values; calculating a quantitative measure ofshort-term change in glucose demand due to said physical activity;calculating a quantitative measure of long-term change in glucose demanddue to said physical activity; and calculating a change in metabolicdemand.
 205. The computer program product of claim 204, wherein saidshort term effects correspond to during and within about 15 minutesafter physical activity.
 206. The computer program product of claim 204,wherein said short term effects correspond to during and within about 1hour after physical activity.
 207. The computer program product of claim204, wherein said short term effects correspond to during and withinabout 2 hour after physical activity.
 208. The computer program productof claim 204, wherein said long-term effects correspond to at leastabout 2 hours after physical activity.
 209. The computer program productof claim 204, wherein said long-term effects correspond to within about6 hours after physical activity.
 210. The computer program product ofclaim 204, wherein said long-term effects correspond to within about 12hours after physical activity.
 211. The computer program product ofclaim 204, wherein said long-term effects correspond to within about 24hours after physical activity.
 212. The computer program product ofclaim 204, wherein said long-term effects correspond to about at least24 hours after physical activity.
 213. The computer program product ofclaim 204, wherein said quantitative measure of short-term change andlong-term change in glucose demand is calculated as:$\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y} + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, n represents the steepness of theaforementioned threshold.
 214. The computer program product of claim175, further comprising: evaluating changes in insulin sensitivity andglucose demand due to the physical activity; and indicatingrecommendations of insulin dosing.
 215. The computer program product ofclaim 214, further comprising: acquiring glucose data, insulin deliverydata and heart rate data.
 216. The computer program product of claim215, wherein said detection of physical activity comprising:transforming said heart rate data; computing an index to detect physicalactivity based on results of said transformation; and detecting physicalactivity using said index and said heart rate data.
 217. The computerprogram product of claim 216, wherein said index is calculated as:$I_{EX} = \frac{\sum\limits_{\upsilon > {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}{\sum\limits_{\upsilon \leq {0.15\mspace{14mu} {Hz}}}\; {P_{t}(\upsilon)}}$where P_(t)(ν) is an estimate of the power spectrum of the first orderdifference of the heart rate signal at time t and frequency ν.
 218. Thecomputer program product of claim 215, wherein said glucose data iscontinuous.
 219. The computer program product of claim 215, wherein saidheart rate data is acquired frequently.
 220. The computer programproduct of claim 215, wherein said heart rate data is acquired with asampling period less than or equal to 1 minute.
 221. The computerprogram product of claim 215, wherein said heart rate data is acquiredwith a sampling period less than or equal to about 10 minutes.
 222. Thecomputer program product of claim 215, wherein said glucose data isacquired frequently.
 223. The computer program product of claim 215,wherein said glucose data is acquired with a sampling period less thanor equal to 15 minutes.
 224. The computer program product of claim 215,wherein said indication of recommendation of insulin dosing occurs about24 hours of acquisition of said heart rate data, said insulin deliverydata, and said glucose data.
 225. The computer program product of claim215, wherein said indication of recommendation of insulin dosing occurswithin about 12 hours of acquiring said heart rate data, said insulinsaid delivery data, and said glucose data.
 226. The computer programproduct of claim 215, wherein said indication of recommendation ofinsulin dosing occurs within about 6 hours of acquiring said heart ratedata, said insulin delivery data, and said glucose data.
 227. Thecomputer program product of claim 215, wherein said indication ofrecommendation of insulin dosing occurs at the completion of acquiringsaid heart rate data, said insulin delivery data, and said glucose data.228. The computer program product of claim 215, wherein said indicationof recommendation of insulin dosing occurs near contemporaneously to thelatest acquisition of said heart rate data, said insulin delivery data,and said glucose data.
 229. The computer program product of claim 215,wherein said indication of recommendation of insulin dosing occurs afterthe completion of acquiring said heart rate data, said insulin deliverydata, and said glucose data.
 230. The computer program product of claim214, wherein said indication of recommendation of insulin dosing occursin real time.
 231. The computer program product of claim 214, whereinsaid evaluation comprising: calculating deviations of heart rate valuesand blood glucose values from basal heart rate values and basal bloodglucose values; calculating a quantitative measure of short-term changein glucose demand and insulin sensitivity due to said physical activity;and calculating a short term change in metabolic demand.
 232. Thecomputer program product of claim 231, wherein said short term effectscorrespond to within about 1 hour after physical activity.
 233. Thecomputer program product of claim 231, wherein said short term effectscorrespond to during and within about 15 minutes after physicalactivity.
 234. The computer program product of claim 231, wherein saidshort term effects correspond to within about 2 hours after physicalactivity.
 235. The computer program product of claim 231, wherein saidquantitative measure of short-term change in glucose demand and insulinsensitivity is calculated as: $\{ {\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3)\end{matrix}\quad} $ wherein G represents glucose value, G_(b) isbasal glucose value, X is insulin dependent action, D represents glucoseinput, V is the diffusion volume, I is the insulin value, I_(b)represents basal insulin value, Y represents the transient variation inmetabolic activity β represents the short term metabolic demand to heartrate ratio, HR represents heart rate, HR_(b) represents basal heartrate, p₁ represents the balance between liver production/demand andinsulin independent glucose demand, τ_(HR) represents the lag betweenonset of physical activity and changes in metabolic demand, p₂represents the lag between appearance of insulin and action of insulin,and p₃ represents the intensity of insulin action.
 236. The computerprogram product of claim 214, wherein said recommendations of insulindosing comprising one or more of the following: calculating aquantitative measure of short-term changes in glucose demand and insulinsensitivity due to physical activity; reducing basal pump rate; andreducing insulin bolus.
 237. The computer program product of claim 214,wherein said recommendations of insulin dosing comprising one or more ofthe following: calculating quantitative measures of short-term changesin glucose demand and insulin sensitivity; adapting a closed loopinsulin prescription; reducing basal pump rate; and reducing insulinbolus.
 238. The computer program product of claim 237, wherein saidadaptation of closed loop insulin prescription comprise of calculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\beta \; {Y(t)}}} + {\frac{\beta \; {Y(t)}}{1 + {\beta \; {Y(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Y(t) represents the transient variation in metabolic activityJ_(b) is injection needed to obtain the plasma concentration I_(b), βrepresents the short term metabolic demand to heart rate ratio.
 239. Thecomputer program product of claim 214, wherein said evaluationcomprising: calculating deviations of heart rate values and bloodglucose values from basal heart rate values and basal blood glucosevalues; calculating a quantitative measure of long-term change inglucose demand and insulin sensitivity due to said physical activity;and calculating a long-term change in metabolic demand.
 240. Thecomputer program product of claim 239, wherein said long-term effectscorrespond to about at least 2 hours after physical activity.
 241. Thecomputer program product of claim 239, wherein said long-term effectscorrespond to within about 6 hours after physical activity.
 242. Thecomputer program product of claim 239, wherein said long-term effectscorrespond to within about 12 hours after physical activity.
 243. Thecomputer program product of claim 239, wherein said long-term effectscorrespond to within about 24 hours after physical activity.
 244. Thecomputer program product of claim 239, wherein said long-term effectscorrespond to about at least 24 hours after physical activity.
 245. Thecomputer program product of claim 239, wherein said quantitative measureof long term change in glucose demand and insulin action is calculatedas: $\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand, p₂ represents the lag between appearance of insulinand action of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 246. The computer program product of claim214, wherein said recommendations of insulin dosing comprising one ormore of the following: calculating a quantitative measure of long-termchanges in glucose demand and insulin sensitivity due to physicalactivity; reducing basal pump rate; and reducing insulin bolus.
 247. Thecomputer program product of claim 214, wherein said recommendations ofinsulin dosing comprising one or more of the following: calculating aquantitative measures of long-term changes in glucose demand and insulinsensitivity; adapting a closed loop insulin prescription; reducing basalpump rate; and reducing insulin bolus.
 248. The computer program productof claim 247, wherein said adaptation of closed loop insulinprescription comprise of calculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\alpha \; {Z(t)}}} + {\frac{\alpha \; {Z(t)}}{1 + {\alpha \; {Z(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Z(t) is the long-term change in insulin sensitivity due tophysical activity at time t, J_(b) is injection needed to obtain theplasma concentration I_(b), and α is the long term change in amplitude.249. The computer program product of claim 214, wherein said evaluationcomprising: calculating deviations of heart rate values and bloodglucose values from basal heart rate values and basal blood glucosevalues; calculating a quantitative measure of short-term change inglucose demand and insulin sensitivity due to said physical activity;calculating a quantitative measure of long-term change in glucose demandand insulin sensitivity due to said physical activity; and calculating achange in metabolic demand.
 250. The computer program product of claim249, wherein said short term effects correspond to within about 1 hourafter physical activity.
 251. The computer program product of claim 249,wherein said short term effects correspond to during and within about 15minutes after physical activity.
 252. The computer program product ofclaim 249, wherein said short term effects correspond to within about 2hours after physical activity.
 253. The computer program product ofclaim 249, wherein said long-term effects correspond to about at least 2hours after physical activity.
 254. The computer program product ofclaim 249, wherein said long-term effects correspond to within about 6hours after physical activity.
 255. The computer program product ofclaim 249, wherein said long-term effects correspond to within about 12hours after physical activity.
 256. The computer program product ofclaim 249, wherein said long-term effects correspond to within about 24hours after physical activity.
 257. The computer program product ofclaim 249, wherein said long-term effects correspond to about at least24 hours after physical activity.
 258. The computer program product ofclaim 249, wherein said quantitative measure of short-term change andsaid quantitative measure of long-term change in glucose demand andinsulin sensitivity is calculated as: $\{ {{\begin{matrix}{\overset{.}{G} = {{- {p_{1}( {G - G_{b}} )}} - {( {1 + {\beta \; Y} + {\alpha \; Z}} ){X \cdot G}} + \frac{D}{V_{g}}}} & (1) \\{\overset{.}{X} = {{{- p_{2}}X} + {p_{3}( {I - I_{b}} )}}} & (2) \\{\overset{.}{Y} = {{{- \frac{1}{\tau_{H\; R}}}Y} + {\frac{1}{\tau_{H\; R}}( {{H\; R} - {H\; R_{b}}} )}}} & (3) \\{\overset{.}{Z} = {{{- ( {{f(Y)} + \frac{1}{\tau}} )} \cdot Z} + {f(Y)}}} & (4)\end{matrix}{where}\mspace{14mu} {f(Y)}} = \frac{( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}{1 + ( \frac{Y}{{a \cdot H}\; R_{b}} )^{n}}} $wherein: G represents glucose value, G_(b) is basal glucose value, X isinsulin dependent action, D represents glucose input, V is the diffusionvolume, I is the insulin value, I_(b) represents basal insulin value, Yrepresents the transient variation in metabolic activity β representsthe short term metabolic demand to heart rate ratio, Z represents thelong-term change in insulin sensitivity due to physical activity, αrepresents the long term change amplitude, HR represents heart rate,HR_(b) represents basal heart rate, p₁ represents the balance betweenliver production/demand and insulin independent glucose demand, τ_(HR)represents the lag between onset of physical activity and changes inmetabolic demand p₂ represents the lag between appearance of insulin andaction of insulin, p₃ represents the intensity of insulin action, arepresents the fraction of basal heart rate above basal heart rate atwhich physical activity is detected, and n represents the steepness ofthe aforementioned threshold.
 259. The computer program product of claim214, wherein said recommendations of insulin dosing comprising one ormore of the following: calculating a quantitative measure of saidlong-term changes and said short-term changes in glucose demand andinsulin sensitivity due to physical activity; reducing basal pump rate;and reducing insulin bolus.
 260. The computer program product of claim214, wherein said recommendations of insulin dosing comprising one ormore of the following: calculating a quantitative measures of short-termchanges and long-term changes in glucose demand and insulin sensitivity;adapting a closed loop insulin prescription; reducing basal pump rate;and reducing insulin bolus.
 261. The computer program product of claim260, wherein said adaptation of closed loop insulin prescriptioncomprise of calculating:${\overset{\sim}{J}(t)} = {\frac{J(t)}{1 + {\alpha \; {Z(t)}} + {\beta \; {Y(t)}}} + {\frac{{\alpha \; {Z(t)}} + {\beta \; {Y(t)}}}{1 + {\alpha \; {Z(t)}} + {\beta \; {Y(t)}}}J_{b}}}$wherein: {tilde over (J)}(t) is an optimal injection schedule adapted tophysical activity at time t, J(t) is an optimal injection schedule attime t, Z(t) is the long-term change in insulin sensitivity due tophysical activity at time t, Y(t) r represents the transient variationin metabolic activity at time t J_(b) is injection needed to obtain theplasma concentration I_(b), β represents the short term metabolic demandto heart rate ratio, and α is the long term change in amplitude.